mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-29 22:30:33 +00:00
a96193f77c
Re-commit of r258951 after fixing layering violation. 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. llvm-svn: 259498
23 lines
679 B
LLVM
23 lines
679 B
LLVM
; 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.
|
|
|
|
declare void @foo(float*) #0
|
|
declare void @foo.varargs(...) #0
|
|
|
|
; CHECK: in function crash_call_constexpr_cast{{.*}}: unsupported call to function foo
|
|
define void @crash_call_constexpr_cast() #0 {
|
|
%alloca = alloca i32
|
|
call void bitcast (void (float*)* @foo to void (i32*)*)(i32* %alloca) #0
|
|
ret void
|
|
}
|
|
|
|
define void @crash_call_constexpr_cast_varargs() #0 {
|
|
%alloca = alloca i32
|
|
call void bitcast (void (...)* @foo.varargs to void (i32*)*)(i32* %alloca) #0
|
|
ret void
|
|
}
|
|
|
|
attributes #0 = { nounwind }
|