Skip to content

Commit 9b290cd

Browse files
committed
[Outliner] Defer bridged property mangling.
Put off calculating the outlined function name until the point at which we will have all the inputs for the name.
1 parent b527649 commit 9b290cd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/SILOptimizer/Transforms/Outliner.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -579,10 +579,6 @@ bool BridgedProperty::matchMethodCall(SILBasicBlock::iterator It,
579579
ObjCMethod->getType().castTo<SILFunctionType>()->hasOpenedExistential())
580580
return false;
581581

582-
// Don't outline in the outlined function.
583-
if (ObjCMethod->getFunction()->getName().equals(getOutlinedFunctionName()))
584-
return false;
585-
586582
// %34 = apply %33(%31) : $@convention(objc_method) (UITextField) -> @autoreleased Optional<NSString>
587583
ADVANCE_ITERATOR_OR_RETURN_FALSE(It);
588584
PropApply = dyn_cast<ApplyInst>(It);
@@ -629,6 +625,10 @@ bool BridgedProperty::matchMethodCall(SILBasicBlock::iterator It,
629625
assert(Release == &*It);
630626
}
631627

628+
// Don't outline in the outlined function.
629+
if (ObjCMethod->getFunction()->getName().equals(getOutlinedFunctionName()))
630+
return false;
631+
632632
// switch_enum %34 : $Optional<NSString>, case #Optional.some!enumelt: bb8, case #Optional.none!enumelt: bb9
633633
ADVANCE_ITERATOR_OR_RETURN_FALSE(It);
634634
return matchSwitch(switchInfo, &*It, PropApply);

0 commit comments

Comments
 (0)