Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / test / Shell / SymbolFile / DWARF / x86 / dwarf5-partial-index.cpp
blobab84415f61b270983e7c4460e7281fee9489be61
1 // Test that we return complete results when only a part of the binary is built
2 // with an index.
4 // REQUIRES: lld
6 // RUN: %clang %s -c -o %t-1.o --target=x86_64-pc-linux -DONE -gdwarf-5 -gpubnames
7 // RUN: llvm-readobj --sections %t-1.o | FileCheck %s --check-prefix NAMES
8 // RUN: %clang %s -c -o %t-2.o --target=x86_64-pc-linux -DTWO -gdwarf-5 -gno-pubnames
9 // RUN: ld.lld %t-1.o %t-2.o -o %t
10 // RUN: lldb-test symbols --find=variable --name=foo %t | FileCheck %s
12 // NAMES: Name: .debug_names
14 // CHECK: Found 2 variables:
15 #ifdef ONE
16 namespace one {
17 int foo;
18 // CHECK-DAG: name = "foo", {{.*}} decl = dwarf5-partial-index.cpp:[[@LINE-1]]
19 } // namespace one
20 extern "C" void _start() {}
21 #else
22 namespace two {
23 int foo;
24 // CHECK-DAG: name = "foo", {{.*}} decl = dwarf5-partial-index.cpp:[[@LINE-1]]
25 } // namespace two
26 #endif