Reference-count inlined functions to keep them alive until we emit debug

info for them and generally clean up the inline scope handling a bit.
Fix the debug scope handling for all clients of SILCloner, especially
the SIL-level spezializers and inliners.
This also adds a ton of additional assertions that will ensure that
future optimization passes won't mess with the debug info in a way that
could confuse the LLVM backend.

Swift SVN r18984
This commit is contained in:
Adrian Prantl
2014-06-18 22:34:10 +00:00
parent 588fb22c40
commit b1a7a7af1b
14 changed files with 171 additions and 100 deletions

View File

@@ -93,6 +93,9 @@ SILModule::SILModule(Module *SwiftModule)
}
SILModule::~SILModule() {
for (SILFunction *F : InlinedFunctions)
F->decrementRefCount();
// Drop everything functions in this module reference.
//
// This is necessary since the functions may reference each other. We don't