aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp b/test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp
index 708920792b..8361680546 100644
--- a/test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp
+++ b/test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp
@@ -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