diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-12-18 02:43:17 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-12-18 02:43:17 +0000 |
commit | 24c7f5efc5c13519ac9d2ada4930f07cfa65b4d0 (patch) | |
tree | dd76d50e850d77fa74ac80931e2c2d04ff1aec3e /clang/lib/CodeGen/CGDebugInfo.cpp | |
parent | 916fec41fb3e0645a9e2bc5e36458391ba79550d (diff) | |
download | bcm5719-llvm-24c7f5efc5c13519ac9d2ada4930f07cfa65b4d0.tar.gz bcm5719-llvm-24c7f5efc5c13519ac9d2ada4930f07cfa65b4d0.zip |
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
llvm-svn: 91661
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 2238c89f835..0a92710ff41 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/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 |