Enhance the function_ref instruction to maintain a refcount on the

SILFunction that it references.  Use this in the mandatory inlining
pass to remove deserialized transparent functions, to clean up the
-emit-sil output of the compiler (and presumably speed up compile 
time).  This implements rdar://15272652



Swift SVN r9699
This commit is contained in:
Chris Lattner
2013-10-27 22:00:54 +00:00
parent 991856dbe5
commit 2127da6a91
6 changed files with 43 additions and 3 deletions

View File

@@ -32,6 +32,8 @@ SILFunction::SILFunction(SILModule &Module, SILLinkage Linkage,
}
SILFunction::~SILFunction() {
assert(RefCount == 0 &&
"Function cannot be deleted while function_ref's still exist");
}
void SILFunction::setDeclContext(Decl *D) {