mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Thread ForUnwind_t into emitCleanupsForReturn.
Some "return" edges are for unwinding due to errors and some aren't. They'll need to be distinguished if we ever want to support throwing cleanups.
This commit is contained in:
@@ -552,7 +552,7 @@ void SILGenFunction::emitArtificialTopLevel(ClassDecl *mainClass) {
|
||||
if (r->getType() != rType)
|
||||
r = B.createStruct(mainClass, rType, r);
|
||||
|
||||
Cleanups.emitCleanupsForReturn(mainClass);
|
||||
Cleanups.emitCleanupsForReturn(mainClass, NotForUnwind);
|
||||
B.createReturn(mainClass, r);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user