mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
Remove unused getMDNodeFwdRefOrNull interfaces (NFC)
Summary: Followup from D53596/r346891. Remove the getMDNodeFwdRefOrNull interface to the MDLoader since it is no longer used. Also improve error messages when the internal implementation is used within the MDLoader. Reviewers: steven_wu Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D54542 llvm-svn: 346899
This commit is contained in:
parent
60bd1fcfbc
commit
a5549f0b08
@ -650,10 +650,6 @@ public:
|
||||
return MetadataList.getMetadataFwdRef(ID);
|
||||
}
|
||||
|
||||
MDNode *getMDNodeFwdRefOrNull(unsigned Idx) {
|
||||
return MetadataList.getMDNodeFwdRefOrNull(Idx);
|
||||
}
|
||||
|
||||
DISubprogram *lookupSubprogramForFunction(Function *F) {
|
||||
return FunctionsWithSPs.lookup(F);
|
||||
}
|
||||
@ -772,7 +768,7 @@ MetadataLoader::MetadataLoaderImpl::lazyLoadModuleMetadataBlock() {
|
||||
// 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 @@ Error MetadataLoader::MetadataLoaderImpl::parseOneMetadata(
|
||||
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 @@ Error MetadataLoader::MetadataLoaderImpl::parseGlobalObjectAttachment(
|
||||
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 @@ Metadata *MetadataLoader::getMetadataFwdRefOrLoad(unsigned Idx) {
|
||||
return Pimpl->getMetadataFwdRefOrLoad(Idx);
|
||||
}
|
||||
|
||||
MDNode *MetadataLoader::getMDNodeFwdRefOrNull(unsigned Idx) {
|
||||
return Pimpl->getMDNodeFwdRefOrNull(Idx);
|
||||
}
|
||||
|
||||
DISubprogram *MetadataLoader::lookupSubprogramForFunction(Function *F) {
|
||||
return Pimpl->lookupSubprogramForFunction(F);
|
||||
}
|
||||
|
@ -65,8 +65,6 @@ public:
|
||||
/// necessary.
|
||||
Metadata *getMetadataFwdRefOrLoad(unsigned Idx);
|
||||
|
||||
MDNode *getMDNodeFwdRefOrNull(unsigned Idx);
|
||||
|
||||
/// Return the DISubprogram metadata for a Function if any, null otherwise.
|
||||
DISubprogram *lookupSubprogramForFunction(Function *F);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user