fix a memory corruption introduced in r22301

(Don't increment refcounts of inlined SILFunctions for the purpose of debug info generation.)



Swift SVN r22349
This commit is contained in:
Erik Eckstein
2014-09-29 09:12:27 +00:00
parent 15eb15598a
commit 35cfa7d2a0
2 changed files with 8 additions and 2 deletions

View File

@@ -683,6 +683,10 @@ void SILModule::invalidateSILLoader() {
void SILModule::eraseFunction(SILFunction *F) {
FunctionTable.erase(F->getName());
// The owner of the function's Name was the FunctionTable key. Avoid a
// dangling pointer.
F->Name = StringRef();
assert(! F->isZombie() && "zombie function is in list of alive functions");
if (F->isInlined()) {