[llvm] 672f051 - [SampleFDO] Fix -Wunused-variable
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 25 14:46:42 PDT 2026
Author: Aiden Grossman
Date: 2026-03-25T21:46:27Z
New Revision: 672f051ed015811cf1db1b56d93e452f1b161074
URL: https://github.com/llvm/llvm-project/commit/672f051ed015811cf1db1b56d93e452f1b161074
DIFF: https://github.com/llvm/llvm-project/commit/672f051ed015811cf1db1b56d93e452f1b161074.diff
LOG: [SampleFDO] Fix -Wunused-variable
Mark [[maybe_unused]] given inlining into the assertion does not make
sense given the call has side effects.
Added:
Modified:
llvm/lib/Transforms/IPO/SampleProfileMatcher.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/IPO/SampleProfileMatcher.cpp b/llvm/lib/Transforms/IPO/SampleProfileMatcher.cpp
index 5cd9dda10c989..36bd51f84d97b 100644
--- a/llvm/lib/Transforms/IPO/SampleProfileMatcher.cpp
+++ b/llvm/lib/Transforms/IPO/SampleProfileMatcher.cpp
@@ -995,7 +995,7 @@ void SampleProfileMatcher::UpdateWithSalvagedProfiles() {
// We need to remove the old entry to avoid duplicating the function
// processing.
SymbolMap->erase(FuncName);
- auto Ret = SymbolMap->emplace(I.second, I.first);
+ [[maybe_unused]] auto Ret = SymbolMap->emplace(I.second, I.first);
LLVM_DEBUG({
if (!Ret.second)
dbgs() << "Profile Function " << I.second
More information about the llvm-commits
mailing list