27 lines · cpp
1// Test that we return complete results when only a part of the binary is built2// with an index.3 4// REQUIRES: lld5 6// RUN: %clangxx %s -c -o %t-1.o --target=x86_64-pc-linux -DONE -gdwarf-5 -gpubnames7// RUN: llvm-readobj --sections %t-1.o | FileCheck %s --check-prefix NAMES8// RUN: %clangxx %s -c -o %t-2.o --target=x86_64-pc-linux -DTWO -gdwarf-5 -gno-pubnames9// RUN: ld.lld %t-1.o %t-2.o -o %t10// RUN: lldb-test symbols --find=variable --name=foo %t | FileCheck %s11 12// NAMES: Name: .debug_names13 14// CHECK: Found 2 variables:15#ifdef ONE16namespace one {17int foo;18// CHECK-DAG: name = "foo", {{.*}} decl = dwarf5-partial-index.cpp:[[@LINE-1]]19} // namespace one20extern "C" void _start() {}21#else22namespace two {23int foo;24// CHECK-DAG: name = "foo", {{.*}} decl = dwarf5-partial-index.cpp:[[@LINE-1]]25} // namespace two26#endif27