[dragonegg] r182581 - Fix the build after recent DIBuilder changes and try another approach to
Duncan Sands
baldrick at free.fr
Thu May 23 05:15:01 PDT 2013
Author: baldrick
Date: Thu May 23 07:15:00 2013
New Revision: 182581
URL: http://llvm.org/viewvc/llvm-project?rev=182581&view=rev
Log:
Fix the build after recent DIBuilder changes and try another approach to
handling derived subroutine types while there.
Modified:
dragonegg/trunk/src/Debug.cpp
Modified: dragonegg/trunk/src/Debug.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Debug.cpp?rev=182581&r1=182580&r2=182581&view=diff
==============================================================================
--- dragonegg/trunk/src/Debug.cpp (original)
+++ dragonegg/trunk/src/Debug.cpp Thu May 23 07:15:00 2013
@@ -231,7 +231,7 @@ StringRef DebugInfo::getFunctionName(tre
/// EmitFunctionStart - Constructs the debug code for entering a function.
void DebugInfo::EmitFunctionStart(tree FnDecl, Function *Fn) {
- DIType FNType = getOrCreateType(TYPE_MAIN_VARIANT(TREE_TYPE(FnDecl)));
+ DIType FNType = getOrCreateType(TREE_TYPE(FnDecl));
unsigned lineno = CurLineNo;
@@ -1115,11 +1115,13 @@ DISubprogram DebugInfo::CreateSubprogram
StringRef LinkageName, DIFile F, unsigned LineNo, DIType Ty,
bool isLocalToUnit, bool isDefinition, unsigned VK, unsigned VIndex,
DIType ContainingType, unsigned Flags, bool isOptimized, Function *Fn) {
+ DICompositeType CTy = getDICompositeType(Ty);
+ assert(CTy.Verify() && "Expected a composite type!");
if (ContainingType.isValid() || VK || VIndex)
- return Builder.createMethod(Context, Name, LinkageName, F, LineNo, Ty,
+ return Builder.createMethod(Context, Name, LinkageName, F, LineNo, CTy,
isLocalToUnit, isDefinition, VK, VIndex, NULL,
Flags, isOptimized, Fn, NULL);
- return Builder.createFunction(Context, Name, LinkageName, F, LineNo, Ty,
+ return Builder.createFunction(Context, Name, LinkageName, F, LineNo, CTy,
isLocalToUnit, isDefinition, LineNo, Flags,
isOptimized, Fn, NULL, NULL);
}
More information about the llvm-commits
mailing list