Home | History | Annotate | Download | only in CodeGenCXX
      1 // RUN: %clang_cc1 -triple i386-unknown-unknown -fexceptions -emit-llvm %s -o - | FileCheck %s
      2 int c(void) __attribute__((const));
      3 int p(void) __attribute__((pure));
      4 int t(void);
      5 
      6 // CHECK: define i32 @_Z1fv() [[TF:#[0-9]+]] {
      7 int f(void) {
      8   // CHECK: call i32 @_Z1cv() [[NUW_RN_CALL:#[0-9]+]]
      9   // CHECK: call i32 @_Z1pv() [[NUW_RO_CALL:#[0-9]+]]
     10   return c() + p() + t();
     11 }
     12 
     13 // CHECK: declare i32 @_Z1cv() [[NUW_RN:#[0-9]+]]
     14 // CHECK: declare i32 @_Z1pv() [[NUW_RO:#[0-9]+]]
     15 // CHECK: declare i32 @_Z1tv() [[TF2:#[0-9]+]]
     16 
     17 // CHECK: attributes [[TF]] = { {{.*}} }
     18 // CHECK: attributes [[NUW_RN]] = { nounwind readnone{{.*}} }
     19 // CHECK: attributes [[NUW_RO]] = { nounwind readonly{{.*}} }
     20 // CHECK: attributes [[TF2]] = { {{.*}} }
     21 // CHECK: attributes [[NUW_RN_CALL]] = { nounwind readnone }
     22 // CHECK: attributes [[NUW_RO_CALL]] = { nounwind readonly }
     23