Do not forget last element, function, while creating Subprogram definition MDNode from subprogram declare MDNode.
llvm-svn: 106985
diff --git a/llvm/lib/Analysis/DebugInfo.cpp b/llvm/lib/Analysis/DebugInfo.cpp
index feb7a30..7636716 100644
--- a/llvm/lib/Analysis/DebugInfo.cpp
+++ b/llvm/lib/Analysis/DebugInfo.cpp
@@ -997,7 +997,8 @@
DeclNode->getOperand(12), // VIndex
DeclNode->getOperand(13), // Containting Type
DeclNode->getOperand(14), // isArtificial
- DeclNode->getOperand(15) // isOptimized
+ DeclNode->getOperand(15), // isOptimized
+ SPDeclaration.getFunction()
};
return DISubprogram(MDNode::get(VMContext, &Elts[0], 16));
}