]> granicus.if.org Git - clang/commitdiff
FileCheckize this test.
authorEric Christopher <echristo@apple.com>
Mon, 15 Aug 2011 22:48:14 +0000 (22:48 +0000)
committerEric Christopher <echristo@apple.com>
Mon, 15 Aug 2011 22:48:14 +0000 (22:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137671 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp

index 708920792bf09d3029036b682d9918cccc9cc187..8361680546f3d8758d274df52a1cc86902402095 100644 (file)
@@ -1,8 +1,15 @@
-// RUN: %clang_cc1 -fexceptions -emit-llvm %s -o - | grep nounwind | count 4
+// RUN: %clang_cc1 -fexceptions -emit-llvm %s -o - | FileCheck %s
 int c(void) __attribute__((const));
 int p(void) __attribute__((pure));
 int t(void);
 
+// CHECK: define i32 @_Z1fv() {
 int f(void) {
+  // CHECK: call i32 @_Z1cv() nounwind readnone
+  // CHECK: call i32 @_Z1pv() nounwind readonly
   return c() + p() + t();
 }
+
+// CHECK: declare i32 @_Z1cv() nounwind readnone
+// CHECK: declare i32 @_Z1pv() nounwind readonly
+// CHECK-NOT: declare i32 @_Z1tv() nounwind