2008-02-19 01:41:04 +00:00
|
|
|
; RUN: llvm-as < %s | llc -march=c | grep builtin_return_address
|
2004-02-14 02:55:47 +00:00
|
|
|
|
2008-02-19 01:41:04 +00:00
|
|
|
declare i8* @llvm.returnaddress(i32)
|
2004-02-14 02:55:47 +00:00
|
|
|
|
2008-02-19 01:41:04 +00:00
|
|
|
declare i8* @llvm.frameaddress(i32)
|
|
|
|
|
|
|
|
define i8* @test1() {
|
|
|
|
%X = call i8* @llvm.returnaddress( i32 0 ) ; <i8*> [#uses=1]
|
|
|
|
ret i8* %X
|
2004-02-14 02:55:47 +00:00
|
|
|
}
|
|
|
|
|
2008-02-19 01:41:04 +00:00
|
|
|
define i8* @test2() {
|
|
|
|
%X = call i8* @llvm.frameaddress( i32 0 ) ; <i8*> [#uses=1]
|
|
|
|
ret i8* %X
|
2004-02-14 02:55:47 +00:00
|
|
|
}
|
2008-02-19 01:41:04 +00:00
|
|
|
|