[clang] [llvm] [WPD] Support speculative devirtualization with LTO (PR #233380)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 12 02:28:27 PST 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions c,cpp,h -- clang/test/Driver/fdevirtualize-speculatively.c clang/lib/Driver/ToolChains/CommonArgs.cpp clang/test/Driver/lto.c llvm/include/llvm/AsmParser/LLToken.h llvm/include/llvm/IR/ModuleSummaryIndex.h llvm/include/llvm/IR/ModuleSummaryIndexYAML.h llvm/include/llvm/Transforms/IPO/WholeProgramDevirt.h llvm/lib/AsmParser/LLLexer.cpp llvm/lib/AsmParser/LLParser.cpp llvm/lib/IR/AsmWriter.cpp llvm/lib/LTO/LTO.cpp llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp b/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
index 40d99ac13..b0a2a1a24 100644
--- a/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
+++ b/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
@@ -1283,7 +1283,8 @@ void DevirtModule::applySingleImplDevirt(VTableSlotInfo &SlotInfo,
}
if (CSInfo.isExported())
IsExported = true;
- if (!HasPublicTarget && Opts.wholeprogramdevirt_check != WPDCheckMode::Fallback)
+ if (!HasPublicTarget &&
+ Opts.wholeprogramdevirt_check != WPDCheckMode::Fallback)
CSInfo.markDevirt();
};
Apply(SlotInfo.CSInfo);
``````````
</details>
https://github.com/llvm/llvm-project/pull/233380
More information about the cfe-commits
mailing list