]> granicus.if.org Git - clang/commit
[modules][debuginfo] Only include imported modules when targeting LLDB
authorDavid Blaikie <dblaikie@gmail.com>
Tue, 3 May 2016 23:06:40 +0000 (23:06 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Tue, 3 May 2016 23:06:40 +0000 (23:06 +0000)
commit6bd4c225fc54be00dd936c9d8b57bb02e64eaf4c
tree0f1d09e989edd8abad3082bb6e1a2c2bc54d0282
parentf2899fa3548edbb3db2bee8cc436fcb24af4eabe
[modules][debuginfo] Only include imported modules when targeting LLDB

These constructs are only applicable to a debugger capable of loading a
Clang AST, so omit them for brevity when not doing so.

We could potentially propagate more of CodeGenOptions through the
ObjectFilePCGContainerOperations for consistency (so the next person who
adds some CodeGenOpts feature that tweaks debug info output doesn't get
caught by this), so I'm open to objections/alternatives there, but went
with this for now.

Tested just a couple of basic cases (one direct, one indirect (through
the ObjectFilePCHContainerOperations) & fixed up other cases to pass the
-debugger-tuning flag as appropriate.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268460 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGDebugInfo.cpp
lib/CodeGen/ObjectFilePCHContainerOperations.cpp
test/Modules/DebugInfoSubmoduleImport.c
test/Modules/DebugInfoTransitiveImport.m
test/Modules/debug-info-moduleimport.m
test/Modules/getSourceDescriptor-crash.cpp