mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user