blob: da8712180ef87e1427972958f8f3eab730cc9e93 [file] [log] [blame]
Ulrich Weigand35668cc2012-10-24 12:22:56 +00001// RUN: %clang_cc1 -triple i386-unknown-unknown -fexceptions -emit-llvm %s -o - | FileCheck %s
Eric Christopherbf005ec2011-08-15 22:38:22 +00002int c(void) __attribute__((const));
3int p(void) __attribute__((pure));
4int t(void);
5
Bill Wendling985d1c52013-02-15 21:30:01 +00006// CHECK: define i32 @_Z1fv() {{.*}} {
Eric Christopherbf005ec2011-08-15 22:38:22 +00007int f(void) {
Eric Christopherd9afc5c2011-08-15 22:48:14 +00008 // CHECK: call i32 @_Z1cv() nounwind readnone
9 // CHECK: call i32 @_Z1pv() nounwind readonly
Eric Christopherbf005ec2011-08-15 22:38:22 +000010 return c() + p() + t();
11}
Eric Christopherd9afc5c2011-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