@@ -135,10 +135,6 @@ static cl::opt<bool> VerifyNoAliasScopeDomination(
135135 cl::desc(" Ensure that llvm.experimental.noalias.scope.decl for identical "
136136 " scopes are not dominating" ));
137137
138- static cl::opt<bool >
139- VerifyAbortOnError (" verifier-abort-on-error" , cl::init(false ),
140- cl::desc(" In the Verifier pass, abort on errors." ));
141-
142138namespace llvm {
143139
144140struct VerifierSupport {
@@ -7869,24 +7865,16 @@ VerifierAnalysis::Result VerifierAnalysis::run(Function &F,
78697865
78707866PreservedAnalyses VerifierPass::run (Module &M, ModuleAnalysisManager &AM) {
78717867 auto Res = AM.getResult <VerifierAnalysis>(M);
7872- if (Res.IRBroken || Res.DebugInfoBroken ) {
7873- // M.IsValid = false;
7874- if (VerifyAbortOnError && FatalErrors)
7875- report_fatal_error (" Broken module found, compilation aborted!" );
7876- return PreservedAnalyses::none ();
7877- }
7868+ if (FatalErrors && (Res.IRBroken || Res.DebugInfoBroken ))
7869+ report_fatal_error (" Broken module found, compilation aborted!" );
78787870
78797871 return PreservedAnalyses::all ();
78807872}
78817873
78827874PreservedAnalyses VerifierPass::run (Function &F, FunctionAnalysisManager &AM) {
78837875 auto res = AM.getResult <VerifierAnalysis>(F);
7884- if (res.IRBroken ) {
7885- // F.getParent()->IsValid = false;
7886- if (VerifyAbortOnError && FatalErrors)
7887- report_fatal_error (" Broken function found, compilation aborted!" );
7888- return PreservedAnalyses::none ();
7889- }
7876+ if (res.IRBroken && FatalErrors)
7877+ report_fatal_error (" Broken function found, compilation aborted!" );
78907878
78917879 return PreservedAnalyses::all ();
78927880}
0 commit comments