[llvm] 241b887 - [TableGen] Silence a warning (NFC)
Jie Fu via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 15 01:35:13 PST 2026
Author: Jie Fu
Date: 2026-02-15T17:34:13+08:00
New Revision: 241b8876ddc7c8805cd0ab4f8265842c0782023e
URL: https://github.com/llvm/llvm-project/commit/241b8876ddc7c8805cd0ab4f8265842c0782023e
DIFF: https://github.com/llvm/llvm-project/commit/241b8876ddc7c8805cd0ab4f8265842c0782023e.diff
LOG: [TableGen] Silence a warning (NFC)
llvm-project/llvm/utils/TableGen/DAGISelMatcherOpt.cpp:495:16:
error: unused variable 'Tmp' [-Werror,-Wunused-variable]
Matcher *Tmp =
^
1 error generated.
Added:
Modified:
llvm/utils/TableGen/DAGISelMatcherOpt.cpp
Removed:
################################################################################
diff --git a/llvm/utils/TableGen/DAGISelMatcherOpt.cpp b/llvm/utils/TableGen/DAGISelMatcherOpt.cpp
index 8a88d3df7b1d0..80f0c3e738400 100644
--- a/llvm/utils/TableGen/DAGISelMatcherOpt.cpp
+++ b/llvm/utils/TableGen/DAGISelMatcherOpt.cpp
@@ -492,7 +492,7 @@ static void FactorNodes(MatcherList &ML) {
// Remove and delete the first node from the other matchers we're factoring.
for (unsigned i = 1, e = EqualMatchers.size(); i != e; ++i) {
EqualMatchers[i].pop_front();
- Matcher *Tmp =
+ [[maybe_unused]] Matcher *Tmp =
EqualMatchers[i].empty() ? nullptr : EqualMatchers[i].front();
assert(!Optn == !Tmp && "Expected all to be null if any are null");
}
More information about the llvm-commits
mailing list