1// UNSUPPORTED: system-windows
2
3// Test that LLDB can follow DWO links produced by -gmodules debug
4// info to find a type in a precompiled header.
5//
6// RUN: %clangxx_host -g -gmodules -fmodules -std=c99 -x c-header %S/Inputs/pch.h -g -c -o %t.pch
7// RUN: %clangxx_host -g -gmodules -fmodules -std=c99 -x c -include-pch %t.pch %s -c -o %t.o
8// RUN: %clangxx_host %t.o -o %t.exe
9// RUN: lldb-test symbols -dump-clang-ast -find type --language=C99 \
10// RUN: -compiler-context 'AnyModule:*,Struct:TypeFromPCH' %t.exe | FileCheck %s
11
12anchor_t anchor;
13
14int main(int argc, char **argv) { return 0; }
15
16// CHECK: Found 1 type
17// CHECK: "TypeFromPCH"
18// CHECK: FieldDecl {{.*}} field
19

source code of lldb/test/Shell/SymbolFile/DWARF/clang-gmodules-type-lookup.c