mirror of
https://github.com/RPCS3/llvm.git
synced 2026-08-26 18:26:51 -04:00
6f6ca7612e
MIPS target supports lowering `RETURNADDR` and `FRAMEADDR` for a current frame only. It's better to show an error message then crash on assertion if `__builtin_return_address` is invoked with non-zero argument. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355558 91177308-0d34-0410-b5e6-96231b3b80d8
12 lines
272 B
LLVM
12 lines
272 B
LLVM
; RUN: not llc -march=mips < %s 2>&1 | FileCheck %s
|
|
|
|
declare i8* @llvm.frameaddress(i32) nounwind readnone
|
|
|
|
define i8* @f() nounwind {
|
|
entry:
|
|
%0 = call i8* @llvm.frameaddress(i32 1)
|
|
ret i8* %0
|
|
|
|
; CHECK: error: return address can be determined only for current frame
|
|
}
|