diff options
Diffstat (limited to 'clang/test/CodeGen/builtin-stackaddress.c')
-rw-r--r-- | clang/test/CodeGen/builtin-stackaddress.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/CodeGen/builtin-stackaddress.c b/clang/test/CodeGen/builtin-stackaddress.c new file mode 100644 index 0000000..f13b90e --- /dev/null +++ b/clang/test/CodeGen/builtin-stackaddress.c @@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -emit-llvm < %s | grep "llvm.returnaddress" +// RUN: %clang_cc1 -emit-llvm < %s | grep "llvm.frameaddress" +void* a(unsigned x) { +return __builtin_return_address(0); +} + +void* c(unsigned x) { +return __builtin_frame_address(0); +} |