1 | // Test that we return complete results when only a part of the binary is built |
2 | // with an index. |
3 | |
4 | // REQUIRES: lld |
5 | |
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 |
11 | |
12 | // NAMES: Name: .debug_names |
13 | |
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 |
27 | |