File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,9 @@ static llvm::cl::opt<bool> AbortOnFailure(
61
61
static llvm::cl::opt<bool > ContinueOnFailure (" verify-continue-on-failure" ,
62
62
llvm::cl::init (false ));
63
63
64
+ static llvm::cl::opt<bool > DumpModuleOnFailure (" verify-dump-module-on-failure" ,
65
+ llvm::cl::init (false ));
66
+
64
67
static llvm::cl::opt<bool > VerifyDIHoles (
65
68
" verify-di-holes" ,
66
69
llvm::cl::init (true ));
@@ -712,8 +715,11 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
712
715
713
716
llvm::dbgs () << " In function:\n " ;
714
717
F.print (llvm::dbgs ());
715
- llvm::dbgs () << " In module:\n " ;
716
- F.getModule ().print (llvm::dbgs ());
718
+ if (DumpModuleOnFailure) {
719
+ // Don't do this by default because modules can be _very_ large.
720
+ llvm::dbgs () << " In module:\n " ;
721
+ F.getModule ().print (llvm::dbgs ());
722
+ }
717
723
718
724
// We abort by default because we want to always crash in
719
725
// the debugger.
You can’t perform that action at this time.
0 commit comments