John McCall | d8e10d2 | 2010-03-27 00:47:27 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple x86_64-darwin-apple -emit-llvm %s -o - | FileCheck %s |
| 2 | |
| 3 | // PR6695 |
| 4 | |
| 5 | // CHECK: define void @test0(i32* %{{.*}}, i32 %{{.*}}) |
| 6 | void test0(int *x, int y) { |
| 7 | } |
| 8 | |
| 9 | // CHECK: define void @test1(i32* noalias %{{.*}}, i32 %{{.*}}) |
| 10 | void test1(int * restrict x, int y) { |
| 11 | } |
| 12 | |
| 13 | // CHECK: define void @test2(i32* %{{.*}}, i32* noalias %{{.*}}) |
| 14 | void test2(int *x, int * restrict y) { |
| 15 | } |
| 16 | |
| 17 | typedef int * restrict rp; |
| 18 | |
| 19 | // CHECK: define void @test3(i32* noalias %{{.*}}, i32 %{{.*}}) |
| 20 | void test3(rp x, int y) { |
| 21 | } |
| 22 | |
| 23 | // CHECK: define void @test4(i32* %{{.*}}, i32* noalias %{{.*}}) |
| 24 | void test4(int *x, rp y) { |
| 25 | } |
| 26 | |