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

Steven Perron via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 16 13:45:56 PDT 2025


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

I'll look into this for a follow up PR if necessary. This change affects many tests, and I don't want it to go stale.

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


More information about the llvm-commits mailing list