[sil-module] Add a helper method to lookup or create a SILFunction based on the SILDeclRef.

This API is more convenient than using the old getOrCreate API, which requires 9 parameters to be provided.
I'm going to use this API in the subsequent commits.

Swift SVN r27097
This commit is contained in:
Roman Levenstein
2015-04-07 22:53:49 +00:00
parent 0c4249293a
commit 0c2fc7c1a4
2 changed files with 103 additions and 0 deletions

View File

@@ -406,6 +406,12 @@ public:
SILFunction::ClassVisibility_t CV =
SILFunction::NotRelevant);
/// \brief Return the declaration of a function, or create it if it doesn't
/// exist..
SILFunction *getOrCreateFunction(SILLocation loc,
SILDeclRef constant,
ForDefinition_t forDefinition);
/// Look up the SILWitnessTable representing the lowering of a protocol
/// conformance, and collect the substitutions to apply to the referenced
/// witnesses, if any.