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 --find-in-any-module \
10// RUN: --language=C99 -compiler-context 'ClassOrStruct:TypeFromPCH' \
11// RUN: %t.exe | FileCheck %s
12
13anchor_t anchor;
14
15int main(int argc, char **argv) { return 0; }
16
17// CHECK: Found 1 type
18// CHECK: "TypeFromPCH"
19// CHECK: FieldDecl {{.*}} field
20

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