Debug Info: Store the SDK in the DICompileUnit.
authorAdrian Prantl <aprantl@apple.com>
Thu, 12 Mar 2020 21:19:04 +0000 (14:19 -0700)
committerAdrian Prantl <aprantl@apple.com>
Fri, 13 Mar 2020 18:21:30 +0000 (11:21 -0700)
commit842ea709e4ed881c2bc59155af5df910eccda9c6
tree0cca5cd073db59bb135125f88fe86053f115f97e
parentafc4dcee8327498616f7dc6ff7260a569d5ad161
Debug Info: Store the SDK in the DICompileUnit.

This is another intermediate step for PR44213
(https://bugs.llvm.org/show_bug.cgi?id=44213).

This stores the SDK *name* in the debug info, to make it possible to
`-fdebug-prefix-map`-replace the sysroot with a recognizable string
and allowing the debugger to find a fitting SDK relative to itself,
not the machine the executable was compiled on.

rdar://problem/51645582
clang/lib/CodeGen/CGDebugInfo.cpp
clang/test/CodeGen/debug-info-sysroot-sdk.c [new file with mode: 0644]
clang/test/CodeGen/debug-info-sysroot.c [deleted file]