Do not forget last element, function, while creating Subprogram definition MDNode from subprogram declare MDNode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106985 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2010-06-27 21:04:31 +00:00
parent 1495247f51
commit acc6efa176

View File

@ -997,7 +997,8 @@ DISubprogram DIFactory::CreateSubprogramDefinition(DISubprogram &SPDeclaration)
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));
}