Pavel Labath | 452bd87 | 2018-06-07 10:35:28 +0000 | [diff] [blame^] | 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 -g -c -emit-llvm -o - --target=x86_64-pc-linux -DONE | \ |
| 7 | // RUN: llc -accel-tables=Dwarf -filetype=obj -o %t-1.o |
| 8 | // RUN: clang %s -g -c -emit-llvm -o - --target=x86_64-pc-linux -DTWO | \ |
| 9 | // RUN: llc -accel-tables=Disable -filetype=obj -o %t-2.o |
| 10 | // RUN: ld.lld %t-1.o %t-2.o -o %t |
| 11 | // RUN: lldb-test symbols --find=variable --name=foo %t | FileCheck %s |
| 12 | |
| 13 | // CHECK: Found 2 variables: |
| 14 | #ifdef ONE |
| 15 | namespace one { |
| 16 | int foo; |
| 17 | // CHECK-DAG: name = "foo", {{.*}} decl = dwarf5-partial-index.cpp:[[@LINE-1]] |
| 18 | } // namespace one |
| 19 | extern "C" void _start() {} |
| 20 | #else |
| 21 | namespace two { |
| 22 | int foo; |
| 23 | // CHECK-DAG: name = "foo", {{.*}} decl = dwarf5-partial-index.cpp:[[@LINE-1]] |
| 24 | } // namespace two |
| 25 | #endif |