mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Adopt ABORT throughout the compiler
Convert a bunch of places where we're dumping to stderr and calling `abort` over to using `ABORT` such that the message gets printed to the pretty stack trace. This ensures it gets picked up by CrashReporter.
This commit is contained in:
@@ -231,19 +231,22 @@ void RequirementMachine::checkCompletionResult(CompletionResult result) const {
|
||||
break;
|
||||
|
||||
case CompletionResult::MaxRuleCount:
|
||||
llvm::errs() << "Rewrite system exceeded maximum rule count\n";
|
||||
dump(llvm::errs());
|
||||
abort();
|
||||
ABORT([&](auto &out) {
|
||||
out << "Rewrite system exceeded maximum rule count\n";
|
||||
dump(out);
|
||||
});
|
||||
|
||||
case CompletionResult::MaxRuleLength:
|
||||
llvm::errs() << "Rewrite system exceeded rule length limit\n";
|
||||
dump(llvm::errs());
|
||||
abort();
|
||||
ABORT([&](auto &out) {
|
||||
out << "Rewrite system exceeded rule length limit\n";
|
||||
dump(out);
|
||||
});
|
||||
|
||||
case CompletionResult::MaxConcreteNesting:
|
||||
llvm::errs() << "Rewrite system exceeded concrete type nesting depth limit\n";
|
||||
dump(llvm::errs());
|
||||
abort();
|
||||
ABORT([&](auto &out) {
|
||||
out << "Rewrite system exceeded concrete type nesting depth limit\n";
|
||||
dump(out);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user