/* RUN: %clang_cc1  %s -emit-llvm -o - | FileCheck %s
 *
 * __builtin_longjmp/setjmp should get transformed into intrinsics.
 */

// CHECK-NOT: builtin_longjmp

void jumpaway(int *ptr) {
  __builtin_longjmp(ptr,1);
}
    
int main(void) {
  __builtin_setjmp(0);
  jumpaway(0);
}

/* RUN: %clang_cc1  %s -emit-llvm -o - | 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);
}

--- 
+++ 
@@ -1,8 +1,9 @@
-/* RUN: %clang_cc1  %s -emit-llvm -o - | not grep __builtin_
+/* RUN: %clang_cc1  %s -emit-llvm -o - | FileCheck %s
  *
- * __builtin_longjmp/setjmp should get transformed into llvm.setjmp/longjmp 
- * just like explicit setjmp/longjmp calls are.
+ * __builtin_longjmp/setjmp should get transformed into intrinsics.
  */
+
+// CHECK-NOT: builtin_longjmp
 
 void jumpaway(int *ptr) {
   __builtin_longjmp(ptr,1);
Fix test in two ways: remove incorrect comment (the intrinsic generated now
is of the llvm.sjlj.* flavore) and convert grep->FileCheck


git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@181468 91177308-0d34-0410-b5e6-96231b3b80d8
