File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,12 @@ static llvm::cl::opt<bool> SkipUnreachableMustBeLastErrors(
50
50
" verify-skip-unreachable-must-be-last" ,
51
51
llvm::cl::init (false ));
52
52
53
+ // This flag controls the default behaviour when hitting a verification
54
+ // failure (abort/exit).
55
+ static llvm::cl::opt<bool > AbortOnFailure (
56
+ " verify-abort-on-failure" ,
57
+ llvm::cl::init (true ));
58
+
53
59
// The verifier is basically all assertions, so don't compile it with NDEBUG to
54
60
// prevent release builds from triggering spurious unused variable warnings.
55
61
@@ -139,7 +145,12 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
139
145
F.print (llvm::dbgs ());
140
146
}
141
147
142
- abort ();
148
+ // We abort by default because we want to always crash in
149
+ // the debugger.
150
+ if (AbortOnFailure)
151
+ abort ();
152
+ else
153
+ exit (1 );
143
154
}
144
155
#define require (condition, complaint ) \
145
156
_require (bool (condition), complaint " : " #condition)
You can’t perform that action at this time.
0 commit comments