Add an SDK attribute to DICompileUnit
authorAdrian Prantl <aprantl@apple.com>
Wed, 4 Mar 2020 22:12:54 +0000 (14:12 -0800)
committerAdrian Prantl <aprantl@apple.com>
Wed, 11 Mar 2020 21:14:06 +0000 (14:14 -0700)
commite4e7e44765c27c788a2a679004f1f65e1fca8005
tree36507304a9d5381394d3483c2140d9482a03005e
parente08464fb450456881733c885267b32dc7339cf11
Add an SDK attribute to DICompileUnit

This is part of PR44213 https://bugs.llvm.org/show_bug.cgi?id=44213

When importing (system) Clang modules, LLDB needs to know which SDK
(e.g., MacOSX, iPhoneSimulator, ...) they came from. While the sysroot
attribute contains the absolute path to the SDK, this doesn't work
well when the debugger is run on a different machine than the
compiler, and the SDKs are installed in different directories. It thus
makes sense to just store the name of the SDK instead of the absolute
path, so it can be found relative to LLDB.

rdar://problem/51645582

Differential Revision: https://reviews.llvm.org/D75646
16 files changed:
llvm/bindings/go/llvm/dibuilder.go
llvm/include/llvm-c/DebugInfo.h
llvm/include/llvm/BinaryFormat/Dwarf.def
llvm/include/llvm/IR/DIBuilder.h
llvm/include/llvm/IR/DebugInfoMetadata.h
llvm/lib/AsmParser/LLParser.cpp
llvm/lib/Bitcode/Reader/MetadataLoader.cpp
llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/lib/IR/AsmWriter.cpp
llvm/lib/IR/DIBuilder.cpp
llvm/lib/IR/DebugInfo.cpp
llvm/lib/IR/DebugInfoMetadata.cpp
llvm/test/DebugInfo/X86/split-dwarf-sysroot.ll
llvm/tools/llvm-c-test/debuginfo.c
llvm/unittests/IR/MetadataTest.cpp