[llvm-commits] [llvm] r150973 - in /llvm/trunk: include/llvm/Analysis/DIBuilder.h lib/Analysis/DIBuilder.cpp
Eric Christopher
echristo at apple.com
Mon Feb 20 10:04:14 PST 2012
Author: echristo
Date: Mon Feb 20 12:04:14 2012
New Revision: 150973
URL: http://llvm.org/viewvc/llvm-project?rev=150973&view=rev
Log:
Add support for runtime languages on our forward declarations.
Modified:
llvm/trunk/include/llvm/Analysis/DIBuilder.h
llvm/trunk/lib/Analysis/DIBuilder.cpp
Modified: llvm/trunk/include/llvm/Analysis/DIBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/DIBuilder.h?rev=150973&r1=150972&r2=150973&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/DIBuilder.h (original)
+++ llvm/trunk/include/llvm/Analysis/DIBuilder.h Mon Feb 20 12:04:14 2012
@@ -343,7 +343,7 @@
/// createForwardDecl - Create a temporary forward-declared type.
DIType createForwardDecl(unsigned Tag, StringRef Name, DIFile F,
- unsigned Line);
+ unsigned Line, unsigned RuntimeLang = 0);
/// retainType - Retain DIType in a module even if it is not referenced
/// through debug info anchors.
Modified: llvm/trunk/lib/Analysis/DIBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/DIBuilder.cpp?rev=150973&r1=150972&r2=150973&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/DIBuilder.cpp (original)
+++ llvm/trunk/lib/Analysis/DIBuilder.cpp Mon Feb 20 12:04:14 2012
@@ -672,7 +672,7 @@
/// createForwardDecl - Create a temporary forward-declared type that
/// can be RAUW'd if the full type is seen.
DIType DIBuilder::createForwardDecl(unsigned Tag, StringRef Name, DIFile F,
- unsigned Line) {
+ unsigned Line, unsigned RuntimeLang) {
// Create a temporary MDNode.
Value *Elts[] = {
GetTagConstant(VMContext, Tag),
@@ -685,7 +685,10 @@
ConstantInt::get(Type::getInt32Ty(VMContext), 0),
ConstantInt::get(Type::getInt32Ty(VMContext), 0),
ConstantInt::get(Type::getInt32Ty(VMContext),
- DIDescriptor::FlagFwdDecl)
+ DIDescriptor::FlagFwdDecl),
+ NULL,
+ DIArray(),
+ ConstantInt::get(Type::getInt32Ty(VMContext), RuntimeLang)
};
MDNode *Node = MDNode::getTemporary(VMContext, Elts);
return DIType(Node);
More information about the llvm-commits
mailing list