From e9fa3585c5929b1c5646140a5cce3f096ca64d1f Mon Sep 17 00:00:00 2001 From: Renato Golin Date: Fri, 13 May 2016 16:02:44 +0000 Subject: [PATCH] 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. llvm-svn: 269432 --- llvm/include/llvm/IR/DiagnosticInfo.h | 2 +- llvm/include/llvm/IR/LLVMContext.h | 5 ---- llvm/lib/IR/LLVMContext.cpp | 3 +- .../AArch64/arm64-inline-asm-error-I.ll | 2 +- .../AArch64/arm64-inline-asm-error-J.ll | 2 +- .../AArch64/arm64-inline-asm-error-K.ll | 2 +- .../AArch64/arm64-inline-asm-error-L.ll | 2 +- .../AArch64/arm64-inline-asm-error-M.ll | 2 +- .../AArch64/arm64-inline-asm-error-N.ll | 2 +- llvm/test/CodeGen/AMDGPU/call.ll | 6 ++-- .../test/CodeGen/AMDGPU/dynamic_stackalloc.ll | 6 ++-- .../CodeGen/AMDGPU/no-hsa-graphics-shaders.ll | 2 +- .../CodeGen/AMDGPU/private-memory-broken.ll | 4 +-- .../AMDGPU/promote-alloca-bitcast-function.ll | 2 +- ...2012-09-25-InlineAsmScalarToVectorConv2.ll | 2 +- llvm/test/CodeGen/BPF/many_args1.ll | 2 +- llvm/test/CodeGen/BPF/many_args2.ll | 2 +- llvm/test/CodeGen/BPF/struct_ret1.ll | 2 +- llvm/test/CodeGen/BPF/struct_ret2.ll | 2 +- .../MIR/Generic/invalid-jump-table-kind.mir | 2 +- .../MIR/Generic/llvm-ir-error-reported.mir | 2 +- .../machine-function-missing-function.mir | 2 +- .../Generic/machine-function-missing-name.mir | 2 +- .../machine-function-redefinition-error.mir | 2 +- .../spill-slot-fixed-stack-object-aliased.mir | 2 +- ...pill-slot-fixed-stack-object-immutable.mir | 2 +- ...variable-sized-stack-object-size-error.mir | 2 +- .../CodeGen/PowerPC/crbit-asm-disabled.ll | 2 +- llvm/test/CodeGen/PowerPC/vec-asm-disabled.ll | 2 +- .../X86/asm-reject-reg-type-mismatch.ll | 2 +- llvm/tools/llc/llc.cpp | 30 ------------------- 31 files changed, 34 insertions(+), 70 deletions(-) diff --git a/llvm/include/llvm/IR/DiagnosticInfo.h b/llvm/include/llvm/IR/DiagnosticInfo.h index 9e5bb2b8a3ac..78d7de27b43a 100644 --- a/llvm/include/llvm/IR/DiagnosticInfo.h +++ b/llvm/include/llvm/IR/DiagnosticInfo.h @@ -34,7 +34,7 @@ class Module; class SMDiagnostic; /// \brief Defines the different supported severity of a diagnostic. -enum DiagnosticSeverity : char { +enum DiagnosticSeverity { DS_Error, DS_Warning, DS_Remark, diff --git a/llvm/include/llvm/IR/LLVMContext.h b/llvm/include/llvm/IR/LLVMContext.h index c19991847220..8f13171f9628 100644 --- a/llvm/include/llvm/IR/LLVMContext.h +++ b/llvm/include/llvm/IR/LLVMContext.h @@ -29,7 +29,6 @@ class MDString; class DICompositeType; class SMDiagnostic; class DiagnosticInfo; -enum DiagnosticSeverity : char; template class SmallVectorImpl; class Function; class DebugLoc; @@ -173,10 +172,6 @@ public: /// setDiagnosticContext. void *getDiagnosticContext() const; - /// \brief Get the prefix that should be printed in front of a diagnostic of - /// the given \p Severity - static const char *getDiagnosticMessagePrefix(DiagnosticSeverity Severity); - /// \brief Report a message to the currently installed diagnostic handler. /// /// This function returns, in particular in the case of error reporting diff --git a/llvm/lib/IR/LLVMContext.cpp b/llvm/lib/IR/LLVMContext.cpp index 9f8680cf6c07..9369cbd6a083 100644 --- a/llvm/lib/IR/LLVMContext.cpp +++ b/llvm/lib/IR/LLVMContext.cpp @@ -231,8 +231,7 @@ static bool isDiagnosticEnabled(const DiagnosticInfo &DI) { return true; } -const char * -LLVMContext::getDiagnosticMessagePrefix(DiagnosticSeverity Severity) { +static const char *getDiagnosticMessagePrefix(DiagnosticSeverity Severity) { switch (Severity) { case DS_Error: return "error"; diff --git a/llvm/test/CodeGen/AArch64/arm64-inline-asm-error-I.ll b/llvm/test/CodeGen/AArch64/arm64-inline-asm-error-I.ll index ec4934a29fee..a7aaf9e55d1b 100644 --- a/llvm/test/CodeGen/AArch64/arm64-inline-asm-error-I.ll +++ b/llvm/test/CodeGen/AArch64/arm64-inline-asm-error-I.ll @@ -1,4 +1,4 @@ -; RUN: not llc -march=arm64 -exit-on-error < %s 2> %t +; RUN: not llc -march=arm64 < %s 2> %t ; RUN: FileCheck --check-prefix=CHECK-ERRORS < %t %s ; Check for at least one invalid constant. diff --git a/llvm/test/CodeGen/AArch64/arm64-inline-asm-error-J.ll b/llvm/test/CodeGen/AArch64/arm64-inline-asm-error-J.ll index a155c144b3ae..077e1b80d93f 100644 --- a/llvm/test/CodeGen/AArch64/arm64-inline-asm-error-J.ll +++ b/llvm/test/CodeGen/AArch64/arm64-inline-asm-error-J.ll @@ -1,4 +1,4 @@ -; RUN: not llc -march=arm64 -exit-on-error < %s 2> %t +; RUN: not llc -march=arm64 < %s 2> %t ; RUN: FileCheck --check-prefix=CHECK-ERRORS < %t %s ; Check for at least one invalid constant. diff --git a/llvm/test/CodeGen/AArch64/arm64-inline-asm-error-K.ll b/llvm/test/CodeGen/AArch64/arm64-inline-asm-error-K.ll index 99b88b88c34d..2a7f9619de55 100644 --- a/llvm/test/CodeGen/AArch64/arm64-inline-asm-error-K.ll +++ b/llvm/test/CodeGen/AArch64/arm64-inline-asm-error-K.ll @@ -1,4 +1,4 @@ -; RUN: not llc -march=arm64 -exit-on-error < %s 2> %t +; RUN: not llc -march=arm64 < %s 2> %t ; RUN: FileCheck --check-prefix=CHECK-ERRORS < %t %s ; Check for at least one invalid constant. diff --git a/llvm/test/CodeGen/AArch64/arm64-inline-asm-error-L.ll b/llvm/test/CodeGen/AArch64/arm64-inline-asm-error-L.ll index b8afc9bf1d7d..170194341951 100644 --- a/llvm/test/CodeGen/AArch64/arm64-inline-asm-error-L.ll +++ b/llvm/test/CodeGen/AArch64/arm64-inline-asm-error-L.ll @@ -1,4 +1,4 @@ -; RUN: not llc -march=arm64 -exit-on-error < %s 2> %t +; RUN: not llc -march=arm64 < %s 2> %t ; RUN: FileCheck --check-prefix=CHECK-ERRORS < %t %s ; Check for at least one invalid constant. diff --git a/llvm/test/CodeGen/AArch64/arm64-inline-asm-error-M.ll b/llvm/test/CodeGen/AArch64/arm64-inline-asm-error-M.ll index 758675045419..952bf6042c2d 100644 --- a/llvm/test/CodeGen/AArch64/arm64-inline-asm-error-M.ll +++ b/llvm/test/CodeGen/AArch64/arm64-inline-asm-error-M.ll @@ -1,4 +1,4 @@ -; RUN: not llc -march=arm64 -exit-on-error < %s 2> %t +; RUN: not llc -march=arm64 < %s 2> %t ; RUN: FileCheck --check-prefix=CHECK-ERRORS < %t %s ; Check for at least one invalid constant. diff --git a/llvm/test/CodeGen/AArch64/arm64-inline-asm-error-N.ll b/llvm/test/CodeGen/AArch64/arm64-inline-asm-error-N.ll index 32c7d32a8efb..b4a199f160ac 100644 --- a/llvm/test/CodeGen/AArch64/arm64-inline-asm-error-N.ll +++ b/llvm/test/CodeGen/AArch64/arm64-inline-asm-error-N.ll @@ -1,4 +1,4 @@ -; RUN: not llc -march=arm64 -exit-on-error < %s 2> %t +; RUN: not llc -march=arm64 < %s 2> %t ; RUN: FileCheck --check-prefix=CHECK-ERRORS < %t %s ; Check for at least one invalid constant. diff --git a/llvm/test/CodeGen/AMDGPU/call.ll b/llvm/test/CodeGen/AMDGPU/call.ll index 168952ca0f15..82e77350ab2d 100644 --- a/llvm/test/CodeGen/AMDGPU/call.ll +++ b/llvm/test/CodeGen/AMDGPU/call.ll @@ -1,6 +1,6 @@ -; RUN: not llc -march=amdgcn -mcpu=SI -verify-machineinstrs -exit-on-error < %s 2>&1 | FileCheck %s -; RUN: not llc -march=amdgcn -mcpu=tonga -verify-machineinstrs -exit-on-error < %s 2>&1 | FileCheck %s -; RUN: not llc -march=r600 -mcpu=cypress -exit-on-error < %s 2>&1 | FileCheck %s +; RUN: not llc -march=amdgcn -mcpu=SI -verify-machineinstrs< %s 2>&1 | FileCheck %s +; RUN: not llc -march=amdgcn -mcpu=tonga -verify-machineinstrs< %s 2>&1 | FileCheck %s +; RUN: not llc -march=r600 -mcpu=cypress < %s 2>&1 | FileCheck %s ; CHECK: in function test_call_external{{.*}}: unsupported call to function external_function diff --git a/llvm/test/CodeGen/AMDGPU/dynamic_stackalloc.ll b/llvm/test/CodeGen/AMDGPU/dynamic_stackalloc.ll index 5d2305600fbd..580dc00f935e 100644 --- a/llvm/test/CodeGen/AMDGPU/dynamic_stackalloc.ll +++ b/llvm/test/CodeGen/AMDGPU/dynamic_stackalloc.ll @@ -1,6 +1,6 @@ -; RUN: not llc -march=amdgcn -mcpu=tahiti -mattr=+promote-alloca -verify-machineinstrs -exit-on-error < %s 2>&1 | FileCheck %s -; RUN: not llc -march=amdgcn -mcpu=tahiti -mattr=-promote-alloca -verify-machineinstrs -exit-on-error < %s 2>&1 | FileCheck %s -; RUN: not llc -march=r600 -mcpu=cypress -exit-on-error < %s 2>&1 | FileCheck %s +; RUN: not llc -march=amdgcn -mcpu=tahiti -mattr=+promote-alloca -verify-machineinstrs < %s 2>&1 | FileCheck %s +; RUN: not llc -march=amdgcn -mcpu=tahiti -mattr=-promote-alloca -verify-machineinstrs < %s 2>&1 | FileCheck %s +; RUN: not llc -march=r600 -mcpu=cypress < %s 2>&1 | FileCheck %s ; CHECK: in function test_dynamic_stackalloc{{.*}}: unsupported dynamic alloca diff --git a/llvm/test/CodeGen/AMDGPU/no-hsa-graphics-shaders.ll b/llvm/test/CodeGen/AMDGPU/no-hsa-graphics-shaders.ll index e6f51fad6a0a..0a7cd57a38ee 100644 --- a/llvm/test/CodeGen/AMDGPU/no-hsa-graphics-shaders.ll +++ b/llvm/test/CodeGen/AMDGPU/no-hsa-graphics-shaders.ll @@ -1,4 +1,4 @@ -; RUN: not llc -march=amdgcn -mtriple=amdgcn-unknown-amdhsa -exit-on-error < %s 2>&1 | FileCheck %s +; RUN: not llc -march=amdgcn -mtriple=amdgcn-unknown-amdhsa < %s 2>&1 | FileCheck %s ; CHECK: in function pixel_s{{.*}}: unsupported non-compute shaders with HSA define amdgpu_ps void @pixel_shader() #0 { diff --git a/llvm/test/CodeGen/AMDGPU/private-memory-broken.ll b/llvm/test/CodeGen/AMDGPU/private-memory-broken.ll index 17a54c70fcf0..6b18a19f1956 100644 --- a/llvm/test/CodeGen/AMDGPU/private-memory-broken.ll +++ b/llvm/test/CodeGen/AMDGPU/private-memory-broken.ll @@ -1,5 +1,5 @@ -; RUN: not llc -verify-machineinstrs -march=amdgcn -mcpu=SI -exit-on-error %s -o /dev/null 2>&1 | FileCheck %s -; RUN: not llc -verify-machineinstrs -march=amdgcn -mcpu=tonga -exit-on-error %s -o /dev/null 2>&1 | FileCheck %s +; RUN: not llc -verify-machineinstrs -march=amdgcn -mcpu=SI %s -o /dev/null 2>&1 | FileCheck %s +; RUN: not llc -verify-machineinstrs -march=amdgcn -mcpu=tonga %s -o /dev/null 2>&1 | FileCheck %s ; Make sure promote alloca pass doesn't crash diff --git a/llvm/test/CodeGen/AMDGPU/promote-alloca-bitcast-function.ll b/llvm/test/CodeGen/AMDGPU/promote-alloca-bitcast-function.ll index 095996d8e10f..609001733b79 100644 --- a/llvm/test/CodeGen/AMDGPU/promote-alloca-bitcast-function.ll +++ b/llvm/test/CodeGen/AMDGPU/promote-alloca-bitcast-function.ll @@ -1,4 +1,4 @@ -; RUN: not llc -march=amdgcn -exit-on-error < %s 2>&1 | FileCheck %s +; RUN: not llc -march=amdgcn < %s 2>&1 | FileCheck %s ; Make sure that AMDGPUPromoteAlloca doesn't crash if the called ; function is a constantexpr cast of a function. diff --git a/llvm/test/CodeGen/ARM/2012-09-25-InlineAsmScalarToVectorConv2.ll b/llvm/test/CodeGen/ARM/2012-09-25-InlineAsmScalarToVectorConv2.ll index 170c09fc141b..b47247c5454f 100644 --- a/llvm/test/CodeGen/ARM/2012-09-25-InlineAsmScalarToVectorConv2.ll +++ b/llvm/test/CodeGen/ARM/2012-09-25-InlineAsmScalarToVectorConv2.ll @@ -1,4 +1,4 @@ -; RUN: not llc -mtriple=arm-eabi -mcpu=cortex-a8 -exit-on-error %s -o - 2>&1 | FileCheck %s +; RUN: not llc -mtriple=arm-eabi -mcpu=cortex-a8 %s -o - 2>&1 | FileCheck %s ; Check for error message: ; CHECK: scalar-to-vector conversion failed, possible invalid constraint for vector type diff --git a/llvm/test/CodeGen/BPF/many_args1.ll b/llvm/test/CodeGen/BPF/many_args1.ll index a5500dad1ed6..08218f452d06 100644 --- a/llvm/test/CodeGen/BPF/many_args1.ll +++ b/llvm/test/CodeGen/BPF/many_args1.ll @@ -1,4 +1,4 @@ -; RUN: not llc -march=bpf -exit-on-error < %s 2> %t1 +; RUN: not llc -march=bpf < %s 2> %t1 ; RUN: FileCheck %s < %t1 ; CHECK: too many args diff --git a/llvm/test/CodeGen/BPF/many_args2.ll b/llvm/test/CodeGen/BPF/many_args2.ll index 08a1179bc5e0..a69886c2b208 100644 --- a/llvm/test/CodeGen/BPF/many_args2.ll +++ b/llvm/test/CodeGen/BPF/many_args2.ll @@ -1,4 +1,4 @@ -; RUN: not llc -march=bpf -exit-on-error < %s 2> %t1 +; RUN: not llc -march=bpf < %s 2> %t1 ; RUN: FileCheck %s < %t1 ; CHECK: too many args diff --git a/llvm/test/CodeGen/BPF/struct_ret1.ll b/llvm/test/CodeGen/BPF/struct_ret1.ll index c6d3f89b9a90..29486b56a272 100644 --- a/llvm/test/CodeGen/BPF/struct_ret1.ll +++ b/llvm/test/CodeGen/BPF/struct_ret1.ll @@ -1,4 +1,4 @@ -; RUN: not llc -march=bpf -exit-on-error < %s 2> %t1 +; RUN: not llc -march=bpf < %s 2> %t1 ; RUN: FileCheck %s < %t1 ; CHECK: only integer returns diff --git a/llvm/test/CodeGen/BPF/struct_ret2.ll b/llvm/test/CodeGen/BPF/struct_ret2.ll index 5266efed7763..90461205f7cf 100644 --- a/llvm/test/CodeGen/BPF/struct_ret2.ll +++ b/llvm/test/CodeGen/BPF/struct_ret2.ll @@ -1,4 +1,4 @@ -; RUN: not llc -march=bpf -exit-on-error < %s 2> %t1 +; RUN: not llc -march=bpf < %s 2> %t1 ; RUN: FileCheck %s < %t1 ; CHECK: only small returns diff --git a/llvm/test/CodeGen/MIR/Generic/invalid-jump-table-kind.mir b/llvm/test/CodeGen/MIR/Generic/invalid-jump-table-kind.mir index 04e5606e87f9..576de4bd9dc7 100644 --- a/llvm/test/CodeGen/MIR/Generic/invalid-jump-table-kind.mir +++ b/llvm/test/CodeGen/MIR/Generic/invalid-jump-table-kind.mir @@ -1,4 +1,4 @@ -# RUN: not llc -start-after branch-folder -stop-after branch-folder -exit-on-error -o /dev/null %s 2>&1 | FileCheck %s +# RUN: not llc -start-after branch-folder -stop-after branch-folder -o /dev/null %s 2>&1 | FileCheck %s --- | diff --git a/llvm/test/CodeGen/MIR/Generic/llvm-ir-error-reported.mir b/llvm/test/CodeGen/MIR/Generic/llvm-ir-error-reported.mir index e404b26b687c..3508c341c44d 100644 --- a/llvm/test/CodeGen/MIR/Generic/llvm-ir-error-reported.mir +++ b/llvm/test/CodeGen/MIR/Generic/llvm-ir-error-reported.mir @@ -1,4 +1,4 @@ -# RUN: not llc -start-after branch-folder -stop-after branch-folder -exit-on-error -o /dev/null %s 2>&1 | FileCheck %s +# RUN: not llc -start-after branch-folder -stop-after branch-folder -o /dev/null %s 2>&1 | FileCheck %s # This test ensures an error is reported if the embedded LLVM IR contains an # error. diff --git a/llvm/test/CodeGen/MIR/Generic/machine-function-missing-function.mir b/llvm/test/CodeGen/MIR/Generic/machine-function-missing-function.mir index 128a98720c21..6800f8724324 100644 --- a/llvm/test/CodeGen/MIR/Generic/machine-function-missing-function.mir +++ b/llvm/test/CodeGen/MIR/Generic/machine-function-missing-function.mir @@ -1,4 +1,4 @@ -# RUN: not llc -start-after branch-folder -stop-after branch-folder -exit-on-error -o /dev/null %s 2>&1 | FileCheck %s +# RUN: not llc -start-after branch-folder -stop-after branch-folder -o /dev/null %s 2>&1 | FileCheck %s # This test ensures that an error is reported when the mir file has LLVM IR and # one of the machine functions has a name that doesn't match any function in # the LLVM IR. diff --git a/llvm/test/CodeGen/MIR/Generic/machine-function-missing-name.mir b/llvm/test/CodeGen/MIR/Generic/machine-function-missing-name.mir index 150b923c4243..f65b77880e97 100644 --- a/llvm/test/CodeGen/MIR/Generic/machine-function-missing-name.mir +++ b/llvm/test/CodeGen/MIR/Generic/machine-function-missing-name.mir @@ -1,4 +1,4 @@ -# RUN: not llc -start-after branch-folder -stop-after branch-folder -exit-on-error -o /dev/null %s 2>&1 | FileCheck %s +# RUN: not llc -start-after branch-folder -stop-after branch-folder -o /dev/null %s 2>&1 | FileCheck %s # This test ensures that an error is reported when a machine function doesn't # have a name attribute. diff --git a/llvm/test/CodeGen/MIR/Generic/machine-function-redefinition-error.mir b/llvm/test/CodeGen/MIR/Generic/machine-function-redefinition-error.mir index 57f3834f29f6..be84161b5630 100644 --- a/llvm/test/CodeGen/MIR/Generic/machine-function-redefinition-error.mir +++ b/llvm/test/CodeGen/MIR/Generic/machine-function-redefinition-error.mir @@ -1,4 +1,4 @@ -# RUN: not llc -start-after branch-folder -stop-after branch-folder -exit-on-error -o /dev/null %s 2>&1 | FileCheck %s +# RUN: not llc -start-after branch-folder -stop-after branch-folder -o /dev/null %s 2>&1 | FileCheck %s # This test ensures that the machine function errors are reported correctly. --- diff --git a/llvm/test/CodeGen/MIR/X86/spill-slot-fixed-stack-object-aliased.mir b/llvm/test/CodeGen/MIR/X86/spill-slot-fixed-stack-object-aliased.mir index f0bb16d51830..b62cd755fec1 100644 --- a/llvm/test/CodeGen/MIR/X86/spill-slot-fixed-stack-object-aliased.mir +++ b/llvm/test/CodeGen/MIR/X86/spill-slot-fixed-stack-object-aliased.mir @@ -1,4 +1,4 @@ -# RUN: not llc -march=x86-64 -start-after branch-folder -stop-after branch-folder -exit-on-error -o /dev/null %s 2>&1 | FileCheck %s +# RUN: not llc -march=x86-64 -start-after branch-folder -stop-after branch-folder -o /dev/null %s 2>&1 | FileCheck %s --- | diff --git a/llvm/test/CodeGen/MIR/X86/spill-slot-fixed-stack-object-immutable.mir b/llvm/test/CodeGen/MIR/X86/spill-slot-fixed-stack-object-immutable.mir index b07a961d6407..c89216bea67a 100644 --- a/llvm/test/CodeGen/MIR/X86/spill-slot-fixed-stack-object-immutable.mir +++ b/llvm/test/CodeGen/MIR/X86/spill-slot-fixed-stack-object-immutable.mir @@ -1,4 +1,4 @@ -# RUN: not llc -march=x86-64 -start-after branch-folder -stop-after branch-folder -exit-on-error -o /dev/null %s 2>&1 | FileCheck %s +# RUN: not llc -march=x86-64 -start-after branch-folder -stop-after branch-folder -o /dev/null %s 2>&1 | FileCheck %s --- | diff --git a/llvm/test/CodeGen/MIR/X86/variable-sized-stack-object-size-error.mir b/llvm/test/CodeGen/MIR/X86/variable-sized-stack-object-size-error.mir index d348cbeffede..e6a9ef8d4c88 100644 --- a/llvm/test/CodeGen/MIR/X86/variable-sized-stack-object-size-error.mir +++ b/llvm/test/CodeGen/MIR/X86/variable-sized-stack-object-size-error.mir @@ -1,4 +1,4 @@ -# RUN: not llc -march=x86-64 -start-after branch-folder -stop-after branch-folder -exit-on-error -o /dev/null %s 2>&1 | FileCheck %s +# RUN: not llc -march=x86-64 -start-after branch-folder -stop-after branch-folder -o /dev/null %s 2>&1 | FileCheck %s --- | define i32 @test(i32 %a) { diff --git a/llvm/test/CodeGen/PowerPC/crbit-asm-disabled.ll b/llvm/test/CodeGen/PowerPC/crbit-asm-disabled.ll index e05b09f8c645..56ec8ecb85d7 100644 --- a/llvm/test/CodeGen/PowerPC/crbit-asm-disabled.ll +++ b/llvm/test/CodeGen/PowerPC/crbit-asm-disabled.ll @@ -1,4 +1,4 @@ -; RUN: not llc -mcpu=pwr7 -exit-on-error -o /dev/null %s 2>&1 | FileCheck %s +; RUN: not llc -mcpu=pwr7 -o /dev/null %s 2>&1 | FileCheck %s target datalayout = "E-m:e-i64:64-n32:64" target triple = "powerpc64-unknown-linux-gnu" diff --git a/llvm/test/CodeGen/PowerPC/vec-asm-disabled.ll b/llvm/test/CodeGen/PowerPC/vec-asm-disabled.ll index 6e4176ef3cd1..333ccce6b89f 100644 --- a/llvm/test/CodeGen/PowerPC/vec-asm-disabled.ll +++ b/llvm/test/CodeGen/PowerPC/vec-asm-disabled.ll @@ -1,4 +1,4 @@ -; RUN: not llc -mcpu=pwr7 -exit-on-error -o /dev/null %s 2>&1 | FileCheck %s +; RUN: not llc -mcpu=pwr7 -o /dev/null %s 2>&1 | FileCheck %s target datalayout = "E-m:e-i64:64-n32:64" target triple = "powerpc64-unknown-linux-gnu" diff --git a/llvm/test/CodeGen/X86/asm-reject-reg-type-mismatch.ll b/llvm/test/CodeGen/X86/asm-reject-reg-type-mismatch.ll index 77f8ac4f717e..c7e86f565eef 100644 --- a/llvm/test/CodeGen/X86/asm-reject-reg-type-mismatch.ll +++ b/llvm/test/CodeGen/X86/asm-reject-reg-type-mismatch.ll @@ -1,4 +1,4 @@ -; RUN: not llc -exit-on-error -o /dev/null %s 2>&1 | FileCheck %s +; RUN: not llc -o /dev/null %s 2>&1 | FileCheck %s target triple = "x86_64--" ; CHECK: error: couldn't allocate output register for constraint '{ax}' diff --git a/llvm/tools/llc/llc.cpp b/llvm/tools/llc/llc.cpp index 252952bf70fc..e219c948d26b 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 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); - static int compileModule(char **, LLVMContext &); static std::unique_ptr @@ -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(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(Context.getDiagnosticContext()); - if (HasError) - return 1; - } - // Compare the two outputs and make sure they're the same if (CompileTwice) { if (Buffer.size() != CompileTwiceBuffer.size() ||