aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-12-18 02:43:17 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-12-18 02:43:17 +0000
commitf2d8b9f967a1ab53ee9fdbcc3ac0a4ee0a83a26e (patch)
treea895667ec91441fddff4eba4440bd06b6195c9fc /lib/CodeGen/CGDebugInfo.cpp
parentdd5614b18cbe4c528b0589b4ba722346bdb9fcce (diff)
Add -dwarf-debug-flags, which provides a way to embed the cc1 level options used
to compile a translation unit into the debug info for that file. - Used by parts of Darwin build process to check compiler flags, etc. - <rdar://problem/7256886> clang does not emit AT_APPLE_flags git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91661 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--lib/CodeGen/CGDebugInfo.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index 2238c89f83..0a92710ff4 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/lib/CodeGen/CGDebugInfo.cpp
@@ -123,8 +123,6 @@ llvm::DICompileUnit CGDebugInfo::getOrCreateCompileUnit(SourceLocation Loc) {
CLANG_VENDOR
#endif
"clang " CLANG_VERSION_STRING;
- bool isOptimized = LO.Optimize;
- const char *Flags = ""; // FIXME: Encode command line options.
// Figure out which version of the ObjC runtime we have.
unsigned RuntimeVers = 0;
@@ -132,11 +130,9 @@ llvm::DICompileUnit CGDebugInfo::getOrCreateCompileUnit(SourceLocation Loc) {
RuntimeVers = LO.ObjCNonFragileABI ? 2 : 1;
// Create new compile unit.
- return Unit = DebugFactory.CreateCompileUnit(LangTag,
- AbsFileName.getLast(),
- AbsFileName.getDirname(),
- Producer, isMain,
- isOptimized, Flags, RuntimeVers);
+ return Unit = DebugFactory.CreateCompileUnit(
+ LangTag, AbsFileName.getLast(), AbsFileName.getDirname(), Producer, isMain,
+ LO.Optimize, CGM.getCodeGenOpts().DwarfDebugFlags, RuntimeVers);
}
/// CreateType - Get the Basic type from the cache or create a new