2009-05-04-PureConstNounwind.cpp revision d946bda308fa62804ec2007b2c2426e9c90e94c4
1// RUN: %clang_cc1 -fexceptions -emit-llvm %s -o - | FileCheck %s 2int c(void) __attribute__((const)); 3int p(void) __attribute__((pure)); 4int t(void); 5 6// CHECK: define i32 @_Z1fv() { 7int f(void) { 8 // CHECK: call i32 @_Z1cv() nounwind readnone 9 // CHECK: call i32 @_Z1pv() nounwind readonly 10 return c() + p() + t(); 11} 12 13// CHECK: declare i32 @_Z1cv() nounwind readnone 14// CHECK: declare i32 @_Z1pv() nounwind readonly 15// CHECK-NOT: declare i32 @_Z1tv() nounwind 16