llvm-project/clang/test/CodeGenOpenCLCXX/address-space-deduction2.cl
Anastasia Stulova 88ed70e247 [OpenCL] Rename lang mode flag for C++ mode
Rename lang mode flag to -cl-std=clc++/-cl-std=CLC++
or -std=clc++/-std=CLC++.

This aligns with OpenCL C conversion and removes ambiguity
with OpenCL C++. 

Differential Revision: https://reviews.llvm.org/D65102

llvm-svn: 367008
2019-07-25 11:04:29 +00:00

21 lines
446 B
Common Lisp

// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++ -O0 -emit-llvm -o - | FileCheck %s
class P {
public:
P(const P &Rhs) = default;
long A;
long B;
};
void foo(__global P *GPtr) {
// CHECK: call void @llvm.memcpy{{.*}}, {{.*}}, i32 16
P Val = GPtr[0];
}
struct __attribute__((packed)) A { int X; };
int test(__global A *GPtr) {
// CHECK: {{.*}} = load i32, {{.*}}, align 1
return static_cast<__generic A &>(*GPtr).X;
}