[clang] Revert "[Clang] Allow devirtualization involving array subscripts with constant indices when the pointee type is known [CWG1504] (#207540) (PR #209596)

via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 14 13:02:07 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results

* 3233 tests passed
* 34 tests skipped

All executed tests passed, but another part of the build **failed**. Click on a failure below to see the details.

<details>
<summary>[code=4294967295] bin/llvm-lto.exe</summary>

```
FAILED: [code=4294967295] bin/llvm-lto.exe
C:\Windows\system32\cmd.exe /C "cd . && C:\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -E vs_link_exe --msvc-ver=1944 --intdir=tools\llvm-lto\CMakeFiles\llvm-lto.dir --rc="C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64\rc.exe" --mt="C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64\mt.exe" --manifests  -- C:\clang\clang-msvc\bin\lld-link.exe /nologo @CMakeFiles\llvm-lto.rsp  /out:bin\llvm-lto.exe /implib:lib\llvm-lto.lib /pdb:bin\llvm-lto.pdb /version:0.0 /MANIFEST:NO /Brepro /INCREMENTAL:NO /subsystem:console  /STACK:10000000 && cd ."
LINK: command "C:\clang\clang-msvc\bin\lld-link.exe /nologo @CMakeFiles\llvm-lto.rsp /out:bin\llvm-lto.exe /implib:lib\llvm-lto.lib /pdb:bin\llvm-lto.pdb /version:0.0 /MANIFEST:NO /Brepro /INCREMENTAL:NO /subsystem:console /STACK:10000000" failed (exit code 1) with the following output:
lld-link: error: undefined symbol: LLVMInitializeBPFTargetMC
>>> referenced by tools\llvm-lto\CMakeFiles\llvm-lto.dir\llvm-lto.cpp.obj:(void __cdecl llvm::InitializeAllTargetMCs(void))

lld-link: error: undefined symbol: public: static char const * __cdecl llvm::BPFInstPrinter::getRegisterName(class llvm::MCRegister)
>>> referenced by LLVMBPFCodeGen.lib(BPFAsmPrinter.cpp.obj):(public: void __cdecl llvm::BPFAsmPrinter::printOperand(class llvm::MachineInstr const *, int, class llvm::raw_ostream &))
>>> referenced by LLVMBPFCodeGen.lib(BPFAsmPrinter.cpp.obj):(public: virtual bool __cdecl llvm::BPFAsmPrinter::PrintAsmMemoryOperand(class llvm::MachineInstr const *, unsigned int, char const *, class llvm::raw_ostream &))
>>> referenced by LLVMBPFCodeGen.lib(BPFAsmPrinter.cpp.obj):(public: virtual bool __cdecl llvm::BPFAsmPrinter::PrintAsmMemoryOperand(class llvm::MachineInstr const *, unsigned int, char const *, class llvm::raw_ostream &))

lld-link: error: undefined symbol: void __cdecl llvm::BPF_MC::verifyInstructionPredicates(unsigned int, class llvm::FeatureBitset const &)
>>> referenced by LLVMBPFCodeGen.lib(BPFAsmPrinter.cpp.obj):(public: virtual void __cdecl llvm::BPFAsmPrinter::emitInstruction(class llvm::MachineInstr const *))

lld-link: error: undefined symbol: struct llvm::MCRegisterClassStorage<2, 24, 6, 3, 2, 0> const llvm::BPFMCRegisterClassStorage
>>> referenced by LLVMBPFCodeGen.lib(BPFMIPeephole.cpp.obj):(private: bool __cdecl `anonymous namespace'::BPFMIPeepholeImpl::isInsnFrom32Def(class llvm::MachineInstr *))
>>> referenced by LLVMBPFCodeGen.lib(BPFMIPeephole.cpp.obj):(private: bool __cdecl `anonymous namespace'::BPFMIPeepholeImpl::isPhiFrom32Def(class llvm::MachineInstr *))
>>> referenced by LLVMBPFCodeGen.lib(BPFMISimplifyPatchable.cpp.obj):(public: bool __cdecl `anonymous namespace'::BPFMISimplifyPatchableImpl::runOnMachineFunction(class llvm::MachineFunction &))
>>> referenced 20 more times

lld-link: error: undefined symbol: class llvm::MCRegisterClass const & __cdecl llvm::getBPFMCRegisterClass(unsigned int)
>>> referenced by LLVMBPFCodeGen.lib(BPFMIChecking.cpp.obj):(void __cdecl processAtomicInsts(class llvm::MachineFunction &))
>>> referenced by LLVMBPFCodeGen.lib(BPFRegisterInfo.cpp.obj):(public: __cdecl llvm::BPFGenRegisterInfo::BPFGenRegisterInfo(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int))
>>> referenced by LLVMBPFCodeGen.lib(BPFRegisterInfo.cpp.obj):(public: __cdecl llvm::BPFRegisterInfo::BPFRegisterInfo(void))

lld-link: error: undefined symbol: struct llvm::SubtargetSubTypeKVStorage<6, 28> const llvm::BPFSubTypeKVStorage
>>> referenced by LLVMBPFCodeGen.lib(BPFSubtarget.cpp.obj):(public: __cdecl llvm::BPFGenSubtargetInfo::BPFGenSubtargetInfo(class llvm::Triple const &, class llvm::StringRef, class llvm::StringRef, class llvm::StringRef))
>>> referenced by LLVMBPFCodeGen.lib(BPFSubtarget.cpp.obj):(public: __cdecl llvm::BPFGenSubtargetInfo::BPFGenSubtargetInfo(class llvm::Triple const &, class llvm::StringRef, class llvm::StringRef, class llvm::StringRef))
>>> referenced by LLVMBPFCodeGen.lib(BPFSubtarget.cpp.obj):(public: __cdecl llvm::BPFGenSubtargetInfo::BPFGenSubtargetInfo(class llvm::Triple const &, class llvm::StringRef, class llvm::StringRef, class llvm::StringRef))
>>> referenced 1 more times

lld-link: error: undefined symbol: struct llvm::SubtargetFeatureKVStorage<4, 178> const llvm::BPFFeatureKVStorage
>>> referenced by LLVMBPFCodeGen.lib(BPFSubtarget.cpp.obj):(public: __cdecl llvm::BPFGenSubtargetInfo::BPFGenSubtargetInfo(class llvm::Triple const &, class llvm::StringRef, class llvm::StringRef, class llvm::StringRef))

lld-link: error: undefined symbol: struct llvm::MCReadAdvanceEntry const *const llvm::BPFReadAdvanceTable
>>> referenced by LLVMBPFCodeGen.lib(BPFSubtarget.cpp.obj):(public: __cdecl llvm::BPFGenSubtargetInfo::BPFGenSubtargetInfo(class llvm::Triple const &, class llvm::StringRef, class llvm::StringRef, class llvm::StringRef))

lld-link: error: undefined symbol: struct llvm::MCWriteLatencyEntry const *const llvm::BPFWriteLatencyTable
>>> referenced by LLVMBPFCodeGen.lib(BPFSubtarget.cpp.obj):(public: __cdecl llvm::BPFGenSubtargetInfo::BPFGenSubtargetInfo(class llvm::Triple const &, class llvm::StringRef, class llvm::StringRef, class llvm::StringRef))

lld-link: error: undefined symbol: struct llvm::MCWriteProcResEntry const *const llvm::BPFWriteProcResTable
>>> referenced by LLVMBPFCodeGen.lib(BPFSubtarget.cpp.obj):(public: __cdecl llvm::BPFGenSubtargetInfo::BPFGenSubtargetInfo(class llvm::Triple const &, class llvm::StringRef, class llvm::StringRef, class llvm::StringRef))

lld-link: error: undefined symbol: struct llvm::MCSchedModel const *const llvm::BPFSchedModels
>>> referenced by LLVMBPFCodeGen.lib(BPFSubtarget.cpp.obj):(public: __cdecl llvm::BPFGenSubtargetInfo::BPFGenSubtargetInfo(class llvm::Triple const &, class llvm::StringRef, class llvm::StringRef, class llvm::StringRef))

lld-link: error: undefined symbol: unsigned int __cdecl llvm::BPF_MC::resolveVariantSchedClassImpl(unsigned int, class llvm::MCInst const *, class llvm::MCInstrInfo const *, class llvm::MCSubtargetInfo const &, unsigned int)
>>> referenced by LLVMBPFCodeGen.lib(BPFSubtarget.cpp.obj):(public: virtual unsigned int __cdecl llvm::BPFGenSubtargetInfo::resolveVariantSchedClass(unsigned int, class llvm::MCInst const *, class llvm::MCInstrInfo const *, unsigned int) const)

lld-link: error: undefined symbol: struct llvm::BPFInstrTable const llvm::BPFDescs
>>> referenced by LLVMBPFCodeGen.lib(BPFInstrInfo.cpp.obj):(public: __cdecl llvm::BPFGenInstrInfo::BPFGenInstrInfo(class llvm::TargetSubtargetInfo const &, class llvm::TargetRegisterInfo const &, unsigned int, unsigned int, unsigned int, unsigned int))
>>> referenced by LLVMBPFCodeGen.lib(BPFInstrInfo.cpp.obj):(public: __cdecl llvm::BPFInstrInfo::BPFInstrInfo(class llvm::BPFSubtarget const &))

lld-link: error: undefined symbol: unsigned int const *const llvm::BPFInstrNameIndices
>>> referenced by LLVMBPFCodeGen.lib(BPFInstrInfo.cpp.obj):(public: __cdecl llvm::BPFGenInstrInfo::BPFGenInstrInfo(class llvm::TargetSubtargetInfo const &, class llvm::TargetRegisterInfo const &, unsigned int, unsigned int, unsigned int, unsigned int))
>>> referenced by LLVMBPFCodeGen.lib(BPFInstrInfo.cpp.obj):(public: __cdecl llvm::BPFInstrInfo::BPFInstrInfo(class llvm::BPFSubtarget const &))

lld-link: error: undefined symbol: char const *const llvm::BPFInstrNameData
>>> referenced by LLVMBPFCodeGen.lib(BPFInstrInfo.cpp.obj):(public: __cdecl llvm::BPFGenInstrInfo::BPFGenInstrInfo(class llvm::TargetSubtargetInfo const &, class llvm::TargetRegisterInfo const &, unsigned int, unsigned int, unsigned int, unsigned int))
>>> referenced by LLVMBPFCodeGen.lib(BPFInstrInfo.cpp.obj):(public: __cdecl llvm::BPFInstrInfo::BPFInstrInfo(class llvm::BPFSubtarget const &))

lld-link: error: undefined symbol: unsigned short const *const llvm::BPFRegEncodingTable
>>> referenced by LLVMBPFCodeGen.lib(BPFRegisterInfo.cpp.obj):(public: __cdecl llvm::BPFGenRegisterInfo::BPFGenRegisterInfo(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int))
>>> referenced by LLVMBPFCodeGen.lib(BPFRegisterInfo.cpp.obj):(public: __cdecl llvm::BPFRegisterInfo::BPFRegisterInfo(void))

lld-link: error: undefined symbol: unsigned short const *const llvm::BPFSubRegIdxLists
>>> referenced by LLVMBPFCodeGen.lib(BPFRegisterInfo.cpp.obj):(public: __cdecl llvm::BPFGenRegisterInfo::BPFGenRegisterInfo(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int))
>>> referenced by LLVMBPFCodeGen.lib(BPFRegisterInfo.cpp.obj):(public: __cdecl llvm::BPFRegisterInfo::BPFRegisterInfo(void))

lld-link: error: undefined symbol: char const *const llvm::BPFRegClassStrings
>>> referenced by LLVMBPFCodeGen.lib(BPFRegisterInfo.cpp.obj):(public: __cdecl llvm::BPFGenRegisterInfo::BPFGenRegisterInfo(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int))
>>> referenced by LLVMBPFCodeGen.lib(BPFRegisterInfo.cpp.obj):(public: __cdecl llvm::BPFRegisterInfo::BPFRegisterInfo(void))

lld-link: error: undefined symbol: char const *const llvm::BPFRegStrings
>>> referenced by LLVMBPFCodeGen.lib(BPFRegisterInfo.cpp.obj):(public: __cdecl llvm::BPFGenRegisterInfo::BPFGenRegisterInfo(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int))
>>> referenced by LLVMBPFCodeGen.lib(BPFRegisterInfo.cpp.obj):(public: __cdecl llvm::BPFRegisterInfo::BPFRegisterInfo(void))

lld-link: error: undefined symbol: struct llvm::LaneBitmask const *const llvm::BPFLaneMaskLists
>>> referenced by LLVMBPFCodeGen.lib(BPFRegisterInfo.cpp.obj):(public: __cdecl llvm::BPFGenRegisterInfo::BPFGenRegisterInfo(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int))
>>> referenced by LLVMBPFCodeGen.lib(BPFRegisterInfo.cpp.obj):(public: __cdecl llvm::BPFRegisterInfo::BPFRegisterInfo(void))

lld-link: error: too many errors emitted, stopping now (use /errorlimit:0 to see all errors)
```
</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/209596


More information about the cfe-commits mailing list