Verify SILSelf parameter type when we create the function in SILModule::getOrCreateFunction instead of moving it into the verifier.

This allows me to remove the map I added to SILModule.

Swift SVN r27242
This commit is contained in:
Michael Gottesman
2015-04-12 22:39:11 +00:00
parent 75ea31dba9
commit 8762675eb7
5 changed files with 39 additions and 79 deletions

View File

@@ -154,16 +154,6 @@ private:
/// This is the set of undef values we've created, for uniquing purposes.
llvm::DenseMap<SILType, SILUndef*> UndefValues;
/// A mapping of SILFunctions -> SILDeclRefs.
///
/// This is populated when ever a SILDeclRef is used to construct a function
/// via getOrCreateFunction(SILLocation, SILDeclRef, ForDefinition_t). It
/// currently may have false negatives, i.e., SILFunctions with SILDeclRefs
/// which are created via the other getOrCreateFunction. Thus this should only
/// be used for conservative queries. It is currently just being used to
/// trigger extra verification of functions with self in the SIL verifier.
llvm::DenseMap<const SILFunction *, SILDeclRef> FunctionToDeclRefMap;
/// The stage of processing this module is at.
SILStage Stage;
@@ -375,11 +365,6 @@ public:
/// \return null if this module has no such function
SILFunction *lookUpFunction(SILDeclRef fnRef);
/// Look for a declaration for a function.
///
/// Returns an optional since some functions will not have SILDeclRefs.
llvm::Optional<SILDeclRef> lookUpDeclRef(const SILFunction *F) const;
/// Attempt to link the SILFunction. Returns true if linking succeeded, false
/// otherwise.
///