OSDN Git Service

[llc] New diagnostic handler
authorRenato Golin <renato.golin@linaro.org>
Sat, 14 May 2016 13:15:22 +0000 (13:15 +0000)
committerRenato Golin <renato.golin@linaro.org>
Sat, 14 May 2016 13:15:22 +0000 (13:15 +0000)
commit2c05d88b8d776bcd113db013276dfcb378ca3838
treec7a01132ddd072fcef54b57f90397890fd96c8e6
parent44f77bce2b8ed59b861e02cf41841f52034ab2d9
[llc] New diagnostic handler

Without a diagnostic handler installed, llc's behaviour is to exit on the first
error that it encounters. This is very different from the behaviour of clang
and other front ends, which try to gather as many errors as possible before
exiting.

This commit adds a diagnostic handler to llc, allowing it to find and report
more than one error. The old behaviour is preserved under a flag (-exit-on-error).

Some of the tests fail with the new diagnostic handler, so they have to use the
new flag in order to run under the previous behaviour. Some of these are known
bugs, others need further investigation. Ideally, we should fix the tests and
remove the flag at some point in the future.

Reapplied after fixing the LLDB build that was broken due to the new
DiagnosticSeverity in LLVMContext.h.

Patch by Diana Picus.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269563 91177308-0d34-0410-b5e6-96231b3b80d8
31 files changed:
include/llvm/IR/DiagnosticInfo.h
include/llvm/IR/LLVMContext.h
lib/IR/LLVMContext.cpp
test/CodeGen/AArch64/arm64-inline-asm-error-I.ll
test/CodeGen/AArch64/arm64-inline-asm-error-J.ll
test/CodeGen/AArch64/arm64-inline-asm-error-K.ll
test/CodeGen/AArch64/arm64-inline-asm-error-L.ll
test/CodeGen/AArch64/arm64-inline-asm-error-M.ll
test/CodeGen/AArch64/arm64-inline-asm-error-N.ll
test/CodeGen/AMDGPU/call.ll
test/CodeGen/AMDGPU/dynamic_stackalloc.ll
test/CodeGen/AMDGPU/no-hsa-graphics-shaders.ll
test/CodeGen/AMDGPU/private-memory-broken.ll
test/CodeGen/AMDGPU/promote-alloca-bitcast-function.ll
test/CodeGen/ARM/2012-09-25-InlineAsmScalarToVectorConv2.ll
test/CodeGen/BPF/many_args1.ll
test/CodeGen/BPF/many_args2.ll
test/CodeGen/BPF/struct_ret1.ll
test/CodeGen/BPF/struct_ret2.ll
test/CodeGen/MIR/Generic/invalid-jump-table-kind.mir
test/CodeGen/MIR/Generic/llvm-ir-error-reported.mir
test/CodeGen/MIR/Generic/machine-function-missing-function.mir
test/CodeGen/MIR/Generic/machine-function-missing-name.mir
test/CodeGen/MIR/Generic/machine-function-redefinition-error.mir
test/CodeGen/MIR/X86/spill-slot-fixed-stack-object-aliased.mir
test/CodeGen/MIR/X86/spill-slot-fixed-stack-object-immutable.mir
test/CodeGen/MIR/X86/variable-sized-stack-object-size-error.mir
test/CodeGen/PowerPC/crbit-asm-disabled.ll
test/CodeGen/PowerPC/vec-asm-disabled.ll
test/CodeGen/X86/asm-reject-reg-type-mismatch.ll
tools/llc/llc.cpp