
[this re-applies c0176916a4824812d25a5a22c4ff7c95857b0cd6 with the correct commit message and phabricator link] This addresses point 1 of PR44213. https://bugs.llvm.org/show_bug.cgi?id=44213 The DW_AT_LLVM_sysroot attribute is used for Clang module debug info, to allow LLDB to import a Clang module from source. Currently it is part of each DW_TAG_module, however, it is the same for all modules in a compile unit. It is more efficient and less ambiguous to store it once in the DW_TAG_compile_unit. This should have no effect on DWARF consumers other than LLDB. Differential Revision: https://reviews.llvm.org/D71732
16 lines
599 B
C
16 lines
599 B
C
// RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple \
|
|
// RUN: %s -isysroot /CLANG_SYSROOT -emit-llvm -o - \
|
|
// RUN: -debugger-tuning=lldb | FileCheck %s --check-prefix=LLDB
|
|
// RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple \
|
|
// RUN: %s -isysroot /CLANG_SYSROOT -emit-llvm -o - \
|
|
// RUN: -debugger-tuning=gdb | FileCheck %s --check-prefix=GDB
|
|
|
|
void foo() {}
|
|
|
|
// The sysroot is an LLDB-tuning-specific attribute.
|
|
|
|
// LLDB: distinct !DICompileUnit({{.*}}sysroot: "/CLANG_SYSROOT"
|
|
// GDB: distinct !DICompileUnit(
|
|
// GDB-NOT: sysroot: "/CLANG_SYSROOT"
|
|
|