[sil-linker] Improve the implementation of the hasSILFunction API

It it now possible to check if a function with a given name and a given linkage exists in one of the modules,
even if the current module contains a function with this name but a difference linkage.
This is useful e.g. for performing a lookup of pre-specializations.
This commit is contained in:
Roman Levenstein
2016-04-13 13:50:19 -07:00
parent e806fd2d1d
commit 9234eb3ca7
7 changed files with 126 additions and 6 deletions

View File

@@ -94,6 +94,7 @@ public:
SILFunction *
lookupSILFunction(StringRef Name, bool declarationOnly = false,
SILLinkage linkage = SILLinkage::Private);
bool hasSILFunction(StringRef Name, SILLinkage linkage = SILLinkage::Private);
SILVTable *lookupVTable(Identifier Name);
SILVTable *lookupVTable(const ClassDecl *C) {
return lookupVTable(C->getName());