diff options
author | Chris Lattner <sabre@nondot.org> | 2009-05-02 01:00:04 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-05-02 01:00:04 +0000 |
commit | 4c2577a31f460afc1f0110b937a250b8e2a1b789 (patch) | |
tree | d0716d29b25f4158b55df88e079ca02a690560fc /lib/CodeGen/CGDebugInfo.cpp | |
parent | 4cef3c1efd64ae5fef2313a2ccc58f076cf72f51 (diff) |
encode the version of the objc runtime into the dwarf compile unit. rdar://6848435,
several other fixes coming.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70616 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index c8d3d634d3..6f3ecdbc06 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -103,13 +103,20 @@ llvm::DICompileUnit CGDebugInfo::getOrCreateCompileUnit(SourceLocation Loc) { LangTag = llvm::dwarf::DW_LANG_C89; } + std::string Producer = "clang";// FIXME: clang version. + bool isOptimized = false; // FIXME: Encode optimization level. + const char *Flags = ""; // FIXME: Encode command line options. + + // Figure out which version of the ObjC runtime we have. + unsigned RuntimeVers = 0; + if (LO.ObjC1) + RuntimeVers = LO.ObjCNonFragileABI ? 2 : 1; + // Create new compile unit. - // FIXME: Do not know how to get clang version yet. - // FIXME: Encode command line options. - // FIXME: Encode optimization level. return Unit = DebugFactory.CreateCompileUnit(LangTag, AbsFileName.getLast(), AbsFileName.getDirname(), - "clang", isMain); + Producer, isMain, isOptimized, + Flags, RuntimeVers); } /// CreateType - Get the Basic type from the cache or create a new |