blob: 36c6dde723bbc2ef946219e9838baed6cf2da000 [file] [log] [blame]
Pavel Labath452bd872018-06-07 10:35:28 +00001// 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
15namespace one {
16int foo;
17// CHECK-DAG: name = "foo", {{.*}} decl = dwarf5-partial-index.cpp:[[@LINE-1]]
18} // namespace one
19extern "C" void _start() {}
20#else
21namespace two {
22int foo;
23// CHECK-DAG: name = "foo", {{.*}} decl = dwarf5-partial-index.cpp:[[@LINE-1]]
24} // namespace two
25#endif