[llvm] r273554 - [llc] Remove exit-on-error flag (PR27759)

Diana Picus via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 23 02:49:56 PDT 2016


Author: rovka
Date: Thu Jun 23 04:49:56 2016
New Revision: 273554

URL: http://llvm.org/viewvc/llvm-project?rev=273554&view=rev
Log:
[llc] Remove exit-on-error flag (PR27759)

This flag was introduced in r269655 with the new diagnostic handler for llc. Its
purpose was to keep the old behavior for some of the tests that didn't recover
well after an error. Those tests have been fixed, so now it's safe to remove the
flag entirely.

Fixes PR27759.

Differential Revision: http://reviews.llvm.org/D21368

Modified:
    llvm/trunk/tools/llc/llc.cpp

Modified: llvm/trunk/tools/llc/llc.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llc/llc.cpp?rev=273554&r1=273553&r2=273554&view=diff
==============================================================================
--- llvm/trunk/tools/llc/llc.cpp (original)
+++ llvm/trunk/tools/llc/llc.cpp Thu Jun 23 04:49:56 2016
@@ -113,11 +113,6 @@ static cl::opt<bool> DiscardValueNames(
     cl::desc("Discard names from Value (other than GlobalValue)."),
     cl::init(false), cl::Hidden);
 
-static cl::opt<bool> ExitOnError(
-    "exit-on-error",
-    cl::desc("Exit as soon as an error is encountered."),
-    cl::init(false), cl::Hidden);
-
 namespace {
 static ManagedStatic<std::vector<std::string>> RunPassNames;
 
@@ -257,8 +252,7 @@ int main(int argc, char **argv) {
 
   // Set a diagnostic handler that doesn't exit on the first error
   bool HasError = false;
-  if (!ExitOnError)
-    Context.setDiagnosticHandler(DiagnosticHandler, &HasError);
+  Context.setDiagnosticHandler(DiagnosticHandler, &HasError);
 
   // Compile the module TimeCompilations times to give better compile time
   // metrics.
@@ -486,11 +480,9 @@ static int compileModule(char **argv, LL
 
     PM.run(*M);
 
-    if (!ExitOnError) {
-      auto HasError = *static_cast<bool *>(Context.getDiagnosticContext());
-      if (HasError)
-        return 1;
-    }
+    auto HasError = *static_cast<bool *>(Context.getDiagnosticContext());
+    if (HasError)
+      return 1;
 
     // Compare the two outputs and make sure they're the same
     if (CompileTwice) {




More information about the llvm-commits mailing list