summaryrefslogtreecommitdiff
path: root/test/CFrontend
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-08-06 18:26:19 +0000
committerChris Lattner <sabre@nondot.org>2003-08-06 18:26:19 +0000
commit51a754ebd90fcbef988ec0c2405c02260551987c (patch)
treed6154e03f0513b5a3e8f8bf0ca10b719b77a9aa4 /test/CFrontend
parent326e40aa8bf6c26c98743f4b4376589cac7230e2 (diff)
downloadllvm-51a754ebd90fcbef988ec0c2405c02260551987c.tar.gz
llvm-51a754ebd90fcbef988ec0c2405c02260551987c.tar.bz2
llvm-51a754ebd90fcbef988ec0c2405c02260551987c.tar.xz
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7643 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CFrontend')
-rw-r--r--test/CFrontend/2003-08-06-BuiltinSetjmpLongjmp.c.tr14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CFrontend/2003-08-06-BuiltinSetjmpLongjmp.c.tr b/test/CFrontend/2003-08-06-BuiltinSetjmpLongjmp.c.tr
new file mode 100644
index 0000000000..abc5bf3b8b
--- /dev/null
+++ b/test/CFrontend/2003-08-06-BuiltinSetjmpLongjmp.c.tr
@@ -0,0 +1,14 @@
+/* RUN: llvmgcc -xc %s -c -o - | dis | not grep __builtin_
+ *
+ * __builtin_longjmp/setjmp should get transformed into llvm.setjmp/longjmp
+ * just like explicit setjmp/longjmp calls are.
+ */
+
+void jumpaway(int *ptr) {
+ __builtin_longjmp(ptr,1);
+}
+
+int main(void) {
+ __builtin_setjmp(0);
+ jumpaway(0);
+}