OSDN Git Service

[llc] New diagnostic handler
authorRenato Golin <renato.golin@linaro.org>
Fri, 13 May 2016 15:37:46 +0000 (15:37 +0000)
committerRenato Golin <renato.golin@linaro.org>
Fri, 13 May 2016 15:37:46 +0000 (15:37 +0000)
commit89ca6c01c07678b8865ec9b402894a5808f5bbc1
treeb9470cf55fe1be10acb299e1fbd3995665c4539e
parent81a5b32238fa58949897137ba8e67c90bd017c5d
[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.

Patch by Diana Picus.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269428 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