[clang] [llvm] [HLSL] Set visibility of cbuffer global variables to internal (2nd attempt) (PR #202745)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 9 12:47:37 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results
The build failed before running any tests. Click on a failure below to see the details.
<details>
<summary>[code=1] lib/Frontend/HLSL/CMakeFiles/LLVMFrontendHLSL.dir/CBuffer.cpp.obj</summary>
```
FAILED: [code=1] lib/Frontend/HLSL/CMakeFiles/LLVMFrontendHLSL.dir/CBuffer.cpp.obj
sccache C:\clang\clang-msvc\bin\clang-cl.exe /nologo -TP -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_GLIBCXX_ASSERTIONS -D_HAS_EXCEPTIONS=0 -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -IC:\_work\llvm-project\llvm-project\build\lib\Frontend\HLSL -IC:\_work\llvm-project\llvm-project\llvm\lib\Frontend\HLSL -IC:\_work\llvm-project\llvm-project\build\include -IC:\_work\llvm-project\llvm-project\llvm\include /DWIN32 /D_WINDOWS /Zc:inline /Zc:__cplusplus /Oi /Brepro /bigobj /permissive- -Werror=unguarded-availability-new /W4 -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported /Gw /O2 /Ob2 -std:c++17 -MD -UNDEBUG /EHs-c- /GR- /showIncludes /Folib\Frontend\HLSL\CMakeFiles\LLVMFrontendHLSL.dir\CBuffer.cpp.obj /Fdlib\Frontend\HLSL\CMakeFiles\LLVMFrontendHLSL.dir\LLVMFrontendHLSL.pdb -c -- C:\_work\llvm-project\llvm-project\llvm\lib\Frontend\HLSL\CBuffer.cpp
C:\_work\llvm-project\llvm-project\llvm\lib\Frontend\HLSL\CBuffer.cpp(84,19): error: unknown type name 'ConstantArray'; did you mean 'ConstantData'?
84 | auto *CA = cast<ConstantArray>(UsedListGV->getInitializer());
| ^~~~~~~~~~~~~
| ConstantData
C:\_work\llvm-project\llvm-project\llvm\include\llvm/IR/Value.h(36,7): note: 'ConstantData' declared here
36 | class ConstantData;
| ^
C:\_work\llvm-project\llvm-project\llvm\lib\Frontend\HLSL\CBuffer.cpp(86,20): error: member access into incomplete type 'llvm::ConstantData'
86 | for (Use &Op : CA->operands()) {
| ^
C:\_work\llvm-project\llvm-project\llvm\include\llvm/IR/Value.h(36,7): note: forward declaration of 'llvm::ConstantData'
36 | class ConstantData;
| ^
C:\_work\llvm-project\llvm-project\llvm\lib\Frontend\HLSL\CBuffer.cpp(99,9): error: use of undeclared identifier 'ConstantArray'
99 | ConstantArray::get(ATy, NewInit), "", UsedListGV,
| ^
In file included from C:\_work\llvm-project\llvm-project\llvm\lib\Frontend\HLSL\CBuffer.cpp:9:
In file included from C:\_work\llvm-project\llvm-project\llvm\include\llvm/Frontend/HLSL/CBuffer.h:17:
In file included from C:\_work\llvm-project\llvm-project\llvm\include\llvm/IR/DataLayout.h:28:
In file included from C:\_work\llvm-project\llvm-project\llvm\include\llvm/IR/DerivedTypes.h:23:
In file included from C:\_work\llvm-project\llvm-project\llvm\include\llvm/IR/Type.h:18:
In file included from C:\_work\llvm-project\llvm-project\llvm\include\llvm/Support/CBindingWrapping.h:17:
C:\_work\llvm-project\llvm-project\llvm\include\llvm/Support/Casting.h(64,53): error: incomplete type 'llvm::ConstantData' named in nested name specifier
64 | static inline bool doit(const From &Val) { return To::classof(&Val); }
| ^~~~
C:\_work\llvm-project\llvm-project\llvm\include\llvm/Support/Casting.h(110,32): note: in instantiation of member function 'llvm::isa_impl<llvm::ConstantData, llvm::Constant>::doit' requested here
110 | return isa_impl<To, From>::doit(*Val);
| ^
C:\_work\llvm-project\llvm-project\llvm\include\llvm/Support/Casting.h(137,37): note: in instantiation of member function 'llvm::isa_impl_cl<llvm::ConstantData, const llvm::Constant *>::doit' requested here
137 | return isa_impl_cl<To, FromTy>::doit(Val);
| ^
C:\_work\llvm-project\llvm-project\llvm\include\llvm/Support/Casting.h(129,9): note: in instantiation of member function 'llvm::isa_impl_wrap<llvm::ConstantData, const llvm::Constant *, const llvm::Constant *>::doit' requested here
129 | doit(simplify_type<const From>::getSimplifiedValue(Val));
| ^
C:\_work\llvm-project\llvm-project\llvm\include\llvm/Support/Casting.h(257,58): note: in instantiation of member function 'llvm::isa_impl_wrap<llvm::ConstantData, const llvm::Constant *const, const llvm::Constant *>::doit' requested here
257 | typename simplify_type<const From>::SimpleType>::doit(f);
| ^
C:\_work\llvm-project\llvm-project\llvm\include\llvm/Support/Casting.h(509,28): note: in instantiation of member function 'llvm::CastIsPossible<llvm::ConstantData, const llvm::Constant *>::isPossible' requested here
509 | return SimplifiedSelf::isPossible(
| ^
C:\_work\llvm-project\llvm-project\llvm\include\llvm/Support/Casting.h(548,37): note: in instantiation of member function 'llvm::CastInfo<llvm::ConstantData, llvm::Constant *const>::isPossible' requested here
548 | return (CastInfo<To, const From>::isPossible(Val) || ...);
| ^
C:\_work\llvm-project\llvm-project\llvm\include\llvm/Support/Casting.h(572,10): note: in instantiation of function template specialization 'llvm::isa<llvm::ConstantData, llvm::Constant *>' requested here
572 | assert(isa<To>(Val) && "cast<Ty>() argument of incompatible type!");
| ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\assert.h(40,17): note: expanded from macro 'assert'
40 | (!!(expression)) || \
| ^
C:\_work\llvm-project\llvm-project\llvm\include\llvm/IR/Value.h(36,7): note: forward declaration of 'llvm::ConstantData'
36 | class ConstantData;
| ^
4 errors generated.
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.
https://github.com/llvm/llvm-project/pull/202745
More information about the cfe-commits
mailing list