From c412e39cb6d12120ece35675faf627615caa001d Mon Sep 17 00:00:00 2001 From: Diana Picus Date: Thu, 23 Jun 2016 09:49:56 +0000 Subject: [PATCH] [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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273554 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llc/llc.cpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp index 6d24204b193..3fbf60b45ad 100644 --- a/tools/llc/llc.cpp +++ b/tools/llc/llc.cpp @@ -113,11 +113,6 @@ static cl::opt DiscardValueNames( cl::desc("Discard names from Value (other than GlobalValue)."), cl::init(false), cl::Hidden); -static cl::opt ExitOnError( - "exit-on-error", - cl::desc("Exit as soon as an error is encountered."), - cl::init(false), cl::Hidden); - namespace { static ManagedStatic> 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, LLVMContext &Context) { PM.run(*M); - if (!ExitOnError) { - auto HasError = *static_cast(Context.getDiagnosticContext()); - if (HasError) - return 1; - } + auto HasError = *static_cast(Context.getDiagnosticContext()); + if (HasError) + return 1; // Compare the two outputs and make sure they're the same if (CompileTwice) { -- 2.11.0