summaryrefslogtreecommitdiff
path: root/tools/llc
diff options
context:
space:
mode:
authorRenato Golin <renato.golin@linaro.org>2016-05-13 16:02:44 +0000
committerRenato Golin <renato.golin@linaro.org>2016-05-13 16:02:44 +0000
commit865778e04a293b3e956e9ce99a496ce2484f737c (patch)
tree55db75b55c0d3ba9c87634008f6522478572129f /tools/llc
parent89ca6c01c07678b8865ec9b402894a5808f5bbc1 (diff)
Revert "[llc] New diagnostic handler"
This reverts commit r269428, as it breaks the LLDB build. We need to understand how to change LLDB in the same way as LLC before landing this again. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269432 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llc')
-rw-r--r--tools/llc/llc.cpp30
1 files changed, 0 insertions, 30 deletions
diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp
index 252952bf70f..e219c948d26 100644
--- a/tools/llc/llc.cpp
+++ b/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() ||