[clang] [llvm] [WPD] Support speculative devirtualization with LTO (PR #233380)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 21 02:53:23 PDT 2026
================
@@ -1131,12 +1120,6 @@ bool DevirtModule::tryFindVirtualCallTargets(
if (Fn->getName() == "__cxa_pure_virtual")
continue;
- // In most cases empty functions will be overridden by the
- // implementation of the derived class, so we can skip them.
- if (DevirtSpeculatively && Fn->getReturnType()->isVoidTy() &&
----------------
KRM7 wrote:
For example, this program would be miscompiled and would return 1 instead of 0 if we kept the check in this patch: https://godbolt.org/z/bedWzheTj
https://github.com/llvm/llvm-project/pull/233380
More information about the cfe-commits
mailing list