mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SIL: Extend cond_fail by a second operand, which is a static string literal, indicating the failure reason.
This commit is contained in:
@@ -712,7 +712,7 @@ struct InductionInfo {
|
||||
auto ResultTy = SILType::getBuiltinIntegerType(1, Builder.getASTContext());
|
||||
auto *CmpSGE = Builder.createBuiltinBinaryFunction(
|
||||
Loc, "cmp_sge", Start->getType(), ResultTy, {Start, End});
|
||||
Builder.createCondFail(Loc, CmpSGE);
|
||||
Builder.createCondFail(Loc, CmpSGE, "loop induction variable overflowed");
|
||||
IsOverflowCheckInserted = true;
|
||||
|
||||
// We can now remove the cond fail on the increment the above comparison
|
||||
|
||||
Reference in New Issue
Block a user