Author: lattner
Date: Fri May 1 20:00:04 2009
New Revision: 70616
URL: http://llvm.org/viewvc/llvm-project?rev=70616&view=rev
Log:
encode the version of the objc runtime into the dwarf compile unit.
rdar://6848435,
several other fixes coming.
Modified:
cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=70616&r1=70615&r2=70616&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Fri May 1 20:00:04 2009
@@ -103,13 +103,20 @@
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
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits