DebugInfo: Simplify a few more explicit constructions, underconstrained types, and make DIType(MDNode*) explicit like all the other DI* node ctors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195055 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie
2013-11-18 23:33:32 +00:00
parent a7b7a7d629
commit 4adba52570
4 changed files with 26 additions and 29 deletions

View File

@@ -752,11 +752,11 @@ DICompositeType DIBuilder::createEnumerationType(
NULL,
UniqueIdentifier.empty() ? NULL : MDString::get(VMContext, UniqueIdentifier)
};
MDNode *Node = MDNode::get(VMContext, Elts);
AllEnumTypes.push_back(Node);
DICompositeType CTy(MDNode::get(VMContext, Elts));
AllEnumTypes.push_back(CTy);
if (!UniqueIdentifier.empty())
retainType(Node);
return DICompositeType(Node);
retainType(CTy);
return CTy;
}
/// createArrayType - Create debugging information entry for an array.