mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add a nothrow flag to the SIL apply_inst.
If the compiler can prove that a throwing function actually does not throw it can replace a try_apply with an "apply [nothrow]". Such an apply_inst calls a function with an error result but does not have the overhead of checking for the error case. Currently this flag is not set, yet. Swift SVN r31151
This commit is contained in:
@@ -777,7 +777,7 @@ ApplyInst *SILGenBuilder::createApply(SILLocation Loc, SILValue Fn,
|
||||
ArrayRef<Substitution> Subs,
|
||||
ArrayRef<SILValue> Args) {
|
||||
SGM.useConformancesFromSubstitutions(Subs);
|
||||
return SILBuilder::createApply(Loc, Fn, SubstFnTy, Result, Subs, Args);
|
||||
return SILBuilder::createApply(Loc, Fn, SubstFnTy, Result, Subs, Args, false);
|
||||
}
|
||||
|
||||
TryApplyInst *SILGenBuilder::createTryApply(SILLocation loc, SILValue Fn,
|
||||
|
||||
Reference in New Issue
Block a user