[clang] [llvm] [HLSL] Set visibility of cbuffer global variables to internal (PR #200312)
Sam Elliott via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 9 12:54:33 PDT 2026
================
@@ -71,6 +72,22 @@ CBufferMetadata::get(Module &M, llvm::function_ref<bool(Type *)> IsPadding) {
return Result;
}
+void CBufferMetadata::removeCBufferGlobalsFromUseList(Module &M) {
+
+ SmallPtrSet<GlobalVariable *, 8> CBGlobals;
+ for (const hlsl::CBufferMapping &Mapping : Mappings)
+ CBGlobals.insert(Mapping.Handle);
+
+ llvm::removeFromUsedLists(M, [&](Constant *C) -> bool {
----------------
lenary wrote:
Thank you!
https://github.com/llvm/llvm-project/pull/200312
More information about the cfe-commits
mailing list