summaryrefslogtreecommitdiff
path: root/lib/AsmParser
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-01-12 22:27:39 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-01-12 22:27:39 +0000
commit0c51e0a826740825644ad6182129a578cf7e00c5 (patch)
tree16016c1dbdbf001ca7360bf83d3d3afa1b96515a /lib/AsmParser
parente390a8e7ab3911abad1bf2a0290578d8b429b756 (diff)
AsmParser: Use subclass API instead of MDNode wrappers, NFC
Use subclass API instead of the wrappers in `MDNode` in the assembly parser. This will make the code easier to follow once we have multiple subclasses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225711 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser')
-rw-r--r--lib/AsmParser/LLParser.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp
index a5ead2ee53d..5d4fb8b7946 100644
--- a/lib/AsmParser/LLParser.cpp
+++ b/lib/AsmParser/LLParser.cpp
@@ -531,7 +531,7 @@ bool LLParser::ParseMDNodeID(MDNode *&Result) {
}
// Otherwise, create MDNode forward reference.
- MDNodeFwdDecl *FwdNode = MDNode::getTemporary(Context, None);
+ MDNodeFwdDecl *FwdNode = MDNodeFwdDecl::get(Context, None);
ForwardRefMDNodes[MID] = std::make_pair(FwdNode, Lex.getLoc());
if (NumberedMetadata.size() <= MID)
@@ -594,9 +594,9 @@ bool LLParser::ParseStandaloneMetadata() {
// See if this was forward referenced, if so, handle it.
auto FI = ForwardRefMDNodes.find(MetadataID);
if (FI != ForwardRefMDNodes.end()) {
- auto *Temp = FI->second.first;
+ MDNodeFwdDecl *Temp = FI->second.first;
Temp->replaceAllUsesWith(Init);
- MDNode::deleteTemporary(Temp);
+ delete Temp;
ForwardRefMDNodes.erase(FI);
assert(NumberedMetadata[MetadataID] == Init && "Tracking VH didn't work");
@@ -2895,7 +2895,7 @@ bool LLParser::ParseMDTuple(MDNode *&MD, bool IsDistinct) {
if (ParseMDNodeVector(Elts))
return true;
- MD = (IsDistinct ? MDNode::getDistinct : MDNode::get)(Context, Elts);
+ MD = (IsDistinct ? MDTuple::getDistinct : MDTuple::get)(Context, Elts);
return false;
}