[PATCH] D54542: Remove unused getMDNodeFwdRefOrNull interfaces (NFC)
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 14 14:00:40 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL346899: Remove unused getMDNodeFwdRefOrNull interfaces (NFC) (authored by tejohnson, committed by ).
Repository:
rL LLVM
https://reviews.llvm.org/D54542
Files:
llvm/trunk/lib/Bitcode/Reader/MetadataLoader.cpp
llvm/trunk/lib/Bitcode/Reader/MetadataLoader.h
Index: llvm/trunk/lib/Bitcode/Reader/MetadataLoader.cpp
===================================================================
--- llvm/trunk/lib/Bitcode/Reader/MetadataLoader.cpp
+++ llvm/trunk/lib/Bitcode/Reader/MetadataLoader.cpp
@@ -650,10 +650,6 @@
return MetadataList.getMetadataFwdRef(ID);
}
- MDNode *getMDNodeFwdRefOrNull(unsigned Idx) {
- return MetadataList.getMDNodeFwdRefOrNull(Idx);
- }
-
DISubprogram *lookupSubprogramForFunction(Function *F) {
return FunctionsWithSPs.lookup(F);
}
@@ -772,7 +768,7 @@
// It is acknowledged by 'TODO: Inherit from Metadata' in the
// NamedMDNode class definition.
MDNode *MD = MetadataList.getMDNodeFwdRefOrNull(Record[i]);
- assert(MD && "Invalid record");
+ assert(MD && "Invalid metadata: expect fwd ref to MDNode");
NMD->addOperand(MD);
}
break;
@@ -1049,7 +1045,7 @@
for (unsigned i = 0; i != Size; ++i) {
MDNode *MD = MetadataList.getMDNodeFwdRefOrNull(Record[i]);
if (!MD)
- return error("Invalid record");
+ return error("Invalid named metadata: expect fwd ref to MDNode");
NMD->addOperand(MD);
}
break;
@@ -1834,7 +1830,7 @@
return error("Invalid ID");
MDNode *MD = MetadataList.getMDNodeFwdRefOrNull(Record[I + 1]);
if (!MD)
- return error("Invalid metadata attachment");
+ return error("Invalid metadata attachment: expect fwd ref to MDNode");
GO.addMetadata(K->second, *MD);
}
return Error::success();
@@ -2004,10 +2000,6 @@
return Pimpl->getMetadataFwdRefOrLoad(Idx);
}
-MDNode *MetadataLoader::getMDNodeFwdRefOrNull(unsigned Idx) {
- return Pimpl->getMDNodeFwdRefOrNull(Idx);
-}
-
DISubprogram *MetadataLoader::lookupSubprogramForFunction(Function *F) {
return Pimpl->lookupSubprogramForFunction(F);
}
Index: llvm/trunk/lib/Bitcode/Reader/MetadataLoader.h
===================================================================
--- llvm/trunk/lib/Bitcode/Reader/MetadataLoader.h
+++ llvm/trunk/lib/Bitcode/Reader/MetadataLoader.h
@@ -65,8 +65,6 @@
/// necessary.
Metadata *getMetadataFwdRefOrLoad(unsigned Idx);
- MDNode *getMDNodeFwdRefOrNull(unsigned Idx);
-
/// Return the DISubprogram metadata for a Function if any, null otherwise.
DISubprogram *lookupSubprogramForFunction(Function *F);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54542.174099.patch
Type: text/x-patch
Size: 2371 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181114/43863b01/attachment.bin>
More information about the llvm-commits
mailing list