[llvm] 8de6d4b - StandardInstrumentation: print verifier output to errs

Nicolai Hähnle via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 29 03:12:16 PDT 2022


Author: Nicolai Hähnle
Date: 2022-06-29T12:11:55+02:00
New Revision: 8de6d4b712944f3f51e1de417877d8f90cd12a87

URL: https://github.com/llvm/llvm-project/commit/8de6d4b712944f3f51e1de417877d8f90cd12a87
DIFF: https://github.com/llvm/llvm-project/commit/8de6d4b712944f3f51e1de417877d8f90cd12a87.diff

LOG: StandardInstrumentation: print verifier output to errs

Enabling the verifiers is not very helpful if their output is
suppressed beyond the fatal error.

Differential Revision: https://reviews.llvm.org/D128743

Added: 
    

Modified: 
    llvm/lib/Passes/StandardInstrumentations.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Passes/StandardInstrumentations.cpp b/llvm/lib/Passes/StandardInstrumentations.cpp
index 4cd2a1ad51e36..ab9f8bf9c957c 100644
--- a/llvm/lib/Passes/StandardInstrumentations.cpp
+++ b/llvm/lib/Passes/StandardInstrumentations.cpp
@@ -1192,7 +1192,7 @@ void VerifyInstrumentation::registerCallbacks(
           if (DebugLogging)
             dbgs() << "Verifying function " << F->getName() << "\n";
 
-          if (verifyFunction(*F))
+          if (verifyFunction(*F, &errs()))
             report_fatal_error("Broken function found, compilation aborted!");
         } else if (any_isa<const Module *>(IR) ||
                    any_isa<const LazyCallGraph::SCC *>(IR)) {
@@ -1207,7 +1207,7 @@ void VerifyInstrumentation::registerCallbacks(
           if (DebugLogging)
             dbgs() << "Verifying module " << M->getName() << "\n";
 
-          if (verifyModule(*M))
+          if (verifyModule(*M, &errs()))
             report_fatal_error("Broken module found, compilation aborted!");
         }
       });


        


More information about the llvm-commits mailing list