[clang] [llvm] [HLSL] Use hidden visibility for external linkage. (PR #140292)

Nathan Gauër via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 16 08:41:57 PDT 2025


================
@@ -1661,6 +1661,11 @@ void CodeGenModule::setGlobalVisibility(llvm::GlobalValue *GV,
     return;
   }
 
+  if (Context.getLangOpts().HLSL && !D->isInExportDeclContext()) {
+    GV->setVisibility(llvm::GlobalValue::HiddenVisibility);
----------------
Keenuts wrote:

GV at line 379 should also be updated, as well as the one for HLSLBufferDecl no?

https://github.com/llvm/llvm-project/pull/140292


More information about the llvm-commits mailing list