[PATCH] D61194: [HIP] Fix visibility of `__constant__` variables.

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 26 11:37:51 PDT 2019


yaxunl added inline comments.


================
Comment at: clang/lib/CodeGen/TargetInfo.cpp:7851
+         (isa<VarDecl>(D) &&
+          (D->hasAttr<CUDADeviceAttr>() || D->hasAttr<CUDAConstantAttr>()));
 }
----------------
is format right?


================
Comment at: clang/test/CodeGenCUDA/amdgpu-visibility.cu:1
+// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -fcuda-is-device -fapply-global-visibility-to-externs -fvisibility default -emit-llvm -o - %s | FileCheck --check-prefix=CHECK-DEFAULT %s
+// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -fcuda-is-device -fapply-global-visibility-to-externs -fvisibility protected -emit-llvm -o - %s | FileCheck --check-prefix=CHECK-PROTECTED %s
----------------
do we need -fapply-global-visibility-to-externs?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61194/new/

https://reviews.llvm.org/D61194





More information about the cfe-commits mailing list