Eric Christopher | d946bda | 2011-08-15 22:48:14 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fexceptions -emit-llvm %s -o - | FileCheck %s |
Eric Christopher | 041087c | 2011-08-15 22:38:22 +0000 | [diff] [blame] | 2 | int c(void) __attribute__((const)); |
| 3 | int p(void) __attribute__((pure)); |
| 4 | int t(void); |
| 5 | |
Eric Christopher | d946bda | 2011-08-15 22:48:14 +0000 | [diff] [blame] | 6 | // CHECK: define i32 @_Z1fv() { |
Eric Christopher | 041087c | 2011-08-15 22:38:22 +0000 | [diff] [blame] | 7 | int f(void) { |
Eric Christopher | d946bda | 2011-08-15 22:48:14 +0000 | [diff] [blame] | 8 | // CHECK: call i32 @_Z1cv() nounwind readnone |
| 9 | // CHECK: call i32 @_Z1pv() nounwind readonly |
Eric Christopher | 041087c | 2011-08-15 22:38:22 +0000 | [diff] [blame] | 10 | return c() + p() + t(); |
| 11 | } |
Eric Christopher | d946bda | 2011-08-15 22:48:14 +0000 | [diff] [blame] | 12 | |
| 13 | // CHECK: declare i32 @_Z1cv() nounwind readnone |
| 14 | // CHECK: declare i32 @_Z1pv() nounwind readonly |
| 15 | // CHECK-NOT: declare i32 @_Z1tv() nounwind |