Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGenOpenCL / str_literals.cl
blobb1ebfc65fdea75a8d5b1f7aa73a6625893bdb7e0
1 // RUN: %clang_cc1 %s -cl-opt-disable -emit-llvm -o - -ffake-address-space-map | FileCheck %s
3 __constant char *__constant x = "hello world";
4 __constant char *__constant y = "hello world";
6 // CHECK: unnamed_addr addrspace(2) constant{{.*}}"hello world\00"
7 // CHECK-NOT: addrspace(2) unnamed_addr constant
8 // CHECK: @x = {{(dso_local )?}}addrspace(2) constant ptr addrspace(2)
9 // CHECK: @y = {{(dso_local )?}}addrspace(2) constant ptr addrspace(2)
10 // CHECK: unnamed_addr addrspace(2) constant{{.*}}"f\00"
12 void f() {
13 //CHECK: store ptr addrspace(2) {{.*}}, ptr
14 constant const char *f3 = __func__;