mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-04 17:11:44 +03:00
16 lines
591 B
D
16 lines
591 B
D
// RUN: %ldc -output-ll -of=%t.ll %s && FileCheck %s < %t.ll
|
|
|
|
import ldc.attributes;
|
|
|
|
// CHECK: define{{.*}} @{{.*}}3foo
|
|
// CHECK-SAME: i8*{{.*}} noalias %p_arg
|
|
void foo(@llvmAttr("noalias") void* p) {}
|
|
|
|
// CHECK: define{{.*}} @{{.*}}3bar
|
|
// CHECK-SAME: [16 x float]*{{.*}} noalias dereferenceable(64) %kernel
|
|
// CHECK-SAME: float*{{.*}} noalias %data_arg
|
|
void bar(@restrict float* data, @restrict ref const float[16] kernel) {}
|
|
|
|
// CHECK: define{{.*}} @{{.*}}14classReference
|
|
// CHECK-SAME: %object.Object*{{.*}} noalias %obj_arg
|
|
void classReference(@restrict Object obj) {}
|