xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/builtin-stackaddress.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -emit-llvm < %s | grep "llvm.returnaddress"
2*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -emit-llvm < %s | grep "llvm.frameaddress"
a(unsigned x)3*f4a2713aSLionel Sambuc void* a(unsigned x) {
4*f4a2713aSLionel Sambuc return __builtin_return_address(0);
5*f4a2713aSLionel Sambuc }
6*f4a2713aSLionel Sambuc 
c(unsigned x)7*f4a2713aSLionel Sambuc void* c(unsigned x) {
8*f4a2713aSLionel Sambuc return __builtin_frame_address(0);
9*f4a2713aSLionel Sambuc }
10