From 1e67a9f1966edbe4b24aaa2ecce7270d00127dd4 Mon Sep 17 00:00:00 2001 From: Oliver Stannard Date: Wed, 27 Jan 2016 17:30:33 +0000 Subject: Refactor backend diagnostics for unsupported features The BPF and WebAssembly backends had identical code for emitting errors for unsupported features, and AMDGPU had very similar code. This merges them all into one DiagnosticInfo subclass, that can be used by any backend. There should be minimal functional changes here, but some AMDGPU tests have been updated for the new format of errors (it used a slightly different format to BPF and WebAssembly). The AMDGPU error messages will now benefit from having precise source locations when debug info is available. The implementation of DiagnosticInfoUnsupported::print must be in lib/Codegen rather than in the existing file in lib/IR/ to avoid introducing a dependency from IR to CodeGen. Differential Revision: http://reviews.llvm.org/D16590 llvm-svn: 258951 --- llvm/test/CodeGen/AMDGPU/global-zero-initializer.ll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/test/CodeGen/AMDGPU/global-zero-initializer.ll') diff --git a/llvm/test/CodeGen/AMDGPU/global-zero-initializer.ll b/llvm/test/CodeGen/AMDGPU/global-zero-initializer.ll index 45aa8bf4e1d..522a4b29775 100644 --- a/llvm/test/CodeGen/AMDGPU/global-zero-initializer.ll +++ b/llvm/test/CodeGen/AMDGPU/global-zero-initializer.ll @@ -1,7 +1,7 @@ ; RUN: not llc -march=amdgcn -mcpu=SI < %s 2>&1 | FileCheck %s ; RUN: not llc -march=amdgcn -mcpu=tonga < %s 2>&1 | FileCheck %s -; CHECK: error: unsupported initializer for address space in load_init_global_global +; CHECK: in function load_init_global_global{{.*}}: unsupported initializer for address space @lds = addrspace(1) global [256 x i32] zeroinitializer -- cgit v1.2.3