[llvm] [ADT] Remove CRTP from FoldingSet and ContextualFoldingSet (NFC) (PR #216830)

Douglas Yung via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 17 23:59:15 PDT 2026


dyung wrote:

@kazutakahirata this change is breaking the build on a Windows bot, can you take a look?

https://lab.llvm.org/buildbot/#/builders/46/builds/39779
```
FAILED: lib/IR/CMakeFiles/LLVMCore.dir/DebugInfo.cpp.obj 
C:\bin\ccache.exe C:\PROGRA~2\MICROS~1\2019\BUILDT~1\VC\Tools\MSVC\1429~1.301\bin\HostX64\x64\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 -Ilib\IR -IZ:\b\llvm-clang-x86_64-sie-win\llvm-project\llvm\lib\IR -Iinclude -IZ:\b\llvm-clang-x86_64-sie-win\llvm-project\llvm\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4146 -wd4244 -wd4267 -wd4456 -wd4457 -wd4458 -wd4459 -wd4624 -wd4100 -wd4127 -wd4505 -wd4702 -wd4245 -wd4310 -wd4701 -wd4703 -wd4389 -wd4805 -wd4577 -wd4319 -wd4324 -wd4251 -wd4275 -w14062 -we4238 /Gw /O2 /Ob2  -MD -UNDEBUG /EHs-c- /GR- -std:c++17 /showIncludes /Folib\IR\CMakeFiles\LLVMCore.dir\DebugInfo.cpp.obj /Fdlib\IR\CMakeFiles\LLVMCore.dir\LLVMCore.pdb /FS -c Z:\b\llvm-clang-x86_64-sie-win\llvm-project\llvm\lib\IR\DebugInfo.cpp
Z:\b\llvm-clang-x86_64-sie-win\llvm-project\llvm\include\llvm/ADT/FoldingSet.h(450): error C2440: 'static_cast': cannot convert from 'llvm::FoldingSetNode *' to 'T *'
        with
        [
            T=llvm::AttributeImpl
        ]
Z:\b\llvm-clang-x86_64-sie-win\llvm-project\llvm\include\llvm/ADT/FoldingSet.h(450): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Z:\b\llvm-clang-x86_64-sie-win\llvm-project\llvm\lib\IR\LLVMContextImpl.h(1605): note: see reference to class template instantiation 'llvm::FoldingSetImpl<llvm::AttributeImpl,llvm::FoldingSetTrait<T,void>>' being compiled
        with
        [
            T=llvm::AttributeImpl
        ]

```

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


More information about the llvm-commits mailing list