brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 250b343 Raw
29 lines · cpp
1// REQUIRES: lld2 3// RUN: %clangxx %s -gdwarf-5 -gpubnames -gsplit-dwarf -c -emit-llvm -o - --target=x86_64-pc-linux -DONE | \4// RUN:   llc -filetype=obj -split-dwarf-file=%t-1.dwo -o %t-1.o5// RUN: llvm-objcopy --split-dwo=%t-1.dwo %t-1.o6// RUN: %clangxx %s -gdwarf-5 -gpubnames -gsplit-dwarf -c -emit-llvm -o - --target=x86_64-pc-linux -DTWO | \7// RUN:   llc -filetype=obj -split-dwarf-file=%t-2.dwo -o %t-2.o8// RUN: llvm-objcopy --split-dwo=%t-2.dwo %t-2.o9// RUN: ld.lld %t-1.o %t-2.o -o %t10// RUN: llvm-readobj --sections %t | FileCheck %s --check-prefix NAMES11// RUN: lldb-test symbols --name=foo --find=variable %t | FileCheck %s12 13// NAMES: Name: .debug_names14 15// CHECK: Found 2 variables:16#ifdef ONE17namespace one {18int foo;19// CHECK-DAG: name = "foo", type = {{.*}} (int), {{.*}} decl = find-variable-dwo.cpp:[[@LINE-1]]20} // namespace one21 22extern "C" void _start() {}23#else24namespace two {25int foo;26// CHECK-DAG: name = "foo", type = {{.*}} (int), {{.*}} decl = find-variable-dwo.cpp:[[@LINE-1]]27} // namespace two28#endif29