Files
clang-p2996/clang/test/CodeGenOpenCL/address-spaces.cl
Peter Collingbourne 599cb8e430 Add support for language-specific address spaces. On top of that,
add support for the OpenCL __private, __local, __constant and
__global address spaces, as well as the __read_only, _read_write and
__write_only image access specifiers.  Patch originally by ARM;
language-specific address space support by myself.

llvm-svn: 127915
2011-03-18 22:38:29 +00:00

28 lines
658 B
Common Lisp

// RUN: %clang_cc1 %s -ffake-address-space-map -emit-llvm -o - | FileCheck %s
void f__p(__private int *arg) { }
// CHECK: i32* nocapture %arg
void f__g(__global int *arg) { }
// CHECK: i32 addrspace(1)* nocapture %arg
void f__l(__local int *arg) { }
// CHECK: i32 addrspace(2)* nocapture %arg
void f__c(__constant int *arg) { }
// CHECK: i32 addrspace(3)* nocapture %arg
void fp(private int *arg) { }
// CHECK: i32* nocapture %arg
void fg(global int *arg) { }
// CHECK: i32 addrspace(1)* nocapture %arg
void fl(local int *arg) { }
// CHECK: i32 addrspace(2)* nocapture %arg
void fc(constant int *arg) { }
// CHECK: i32 addrspace(3)* nocapture %arg