[clang] [llvm] [HLSL] Set visibility of cbuffer global variables to internal (PR #200312)
Sam Elliott via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 8 22:02:05 PDT 2026
lenary wrote:
I think this PR is causing errors in the `BUILD_SHARED_LIBS=On` config:
```
ld.lld: error: undefined symbol: llvm::removeFromUsedLists(llvm::Module&, llvm::function_ref<bool (llvm::Constant*)>)
>>> referenced by CBuffer.cpp:81 (/local/mnt/workspace/aelliott/llvm-upstream/llvm-project/llvm/lib/Frontend/HLSL/CBuffer.cpp:81)
>>> lib/Frontend/HLSL/CMakeFiles/LLVMFrontendHLSL.dir/CBuffer.cpp.o:(llvm::hlsl::CBufferMetadata::removeCBufferGlobalsFromUseList(llvm::Module&))
```
`llvm::removeFromUsedLists` is in the `TransformUtils` component. `CBuffer.cpp` is in the `FrontendHLSL` component, but making the latter depend on `TransformUtils` doesn't work as you get a circular dependency (via `Analysis`).
This may need to be reverted while you work on it.
https://github.com/llvm/llvm-project/pull/200312
More information about the cfe-commits
mailing list