blob: 8361680546f3d8758d274df52a1cc86902402095 [file] [log] [blame]
Eric Christopherd946bda2011-08-15 22:48:14 +00001// RUN: %clang_cc1 -fexceptions -emit-llvm %s -o - | FileCheck %s
Eric Christopher041087c2011-08-15 22:38:22 +00002int c(void) __attribute__((const));
3int p(void) __attribute__((pure));
4int t(void);
5
Eric Christopherd946bda2011-08-15 22:48:14 +00006// CHECK: define i32 @_Z1fv() {
Eric Christopher041087c2011-08-15 22:38:22 +00007int f(void) {
Eric Christopherd946bda2011-08-15 22:48:14 +00008 // CHECK: call i32 @_Z1cv() nounwind readnone
9 // CHECK: call i32 @_Z1pv() nounwind readonly
Eric Christopher041087c2011-08-15 22:38:22 +000010 return c() + p() + t();
11}
Eric Christopherd946bda2011-08-15 22:48:14 +000012
13// CHECK: declare i32 @_Z1cv() nounwind readnone
14// CHECK: declare i32 @_Z1pv() nounwind readonly
15// CHECK-NOT: declare i32 @_Z1tv() nounwind