summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llc/llc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llc/llc.cpp')
-rw-r--r--llvm/tools/llc/llc.cpp30
1 files changed, 0 insertions, 30 deletions
diff --git a/llvm/tools/llc/llc.cpp b/llvm/tools/llc/llc.cpp
index 252952bf70f..e219c948d26 100644
--- a/llvm/tools/llc/llc.cpp
+++ b/llvm/tools/llc/llc.cpp
@@ -25,8 +25,6 @@
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/TargetPassConfig.h"
#include "llvm/IR/DataLayout.h"
-#include "llvm/IR/DiagnosticInfo.h"
-#include "llvm/IR/DiagnosticPrinter.h"
#include "llvm/IR/IRPrintingPasses.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/LegacyPassManager.h"
@@ -113,11 +111,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);
-
static int compileModule(char **, LLVMContext &);
static std::unique_ptr<tool_output_file>
@@ -188,17 +181,6 @@ GetOutputStream(const char *TargetName, Triple::OSType OS,
return FDOut;
}
-static void DiagnosticHandler(const DiagnosticInfo &DI, void *Context) {
- bool *HasError = static_cast<bool *>(Context);
- if (DI.getSeverity() == DS_Error)
- *HasError = true;
-
- DiagnosticPrinterRawOStream DP(errs());
- errs() << LLVMContext::getDiagnosticMessagePrefix(DI.getSeverity()) << ": ";
- DI.print(DP);
- errs() << "\n";
-}
-
// main - Entry point for the llc compiler.
//
int main(int argc, char **argv) {
@@ -233,12 +215,6 @@ int main(int argc, char **argv) {
Context.setDiscardValueNames(DiscardValueNames);
- // Set a diagnostic handler that doesn't exit on the first error
- if (!ExitOnError) {
- bool HasError = false;
- Context.setDiagnosticHandler(DiagnosticHandler, &HasError);
- }
-
// Compile the module TimeCompilations times to give better compile time
// metrics.
for (unsigned I = TimeCompilations; I; --I)
@@ -465,12 +441,6 @@ static int compileModule(char **argv, LLVMContext &Context) {
PM.run(*M);
- if (!ExitOnError) {
- auto HasError = *static_cast<bool *>(Context.getDiagnosticContext());
- if (HasError)
- return 1;
- }
-
// Compare the two outputs and make sure they're the same
if (CompileTwice) {
if (Buffer.size() != CompileTwiceBuffer.size() ||
OpenPOWER on IntegriCloud