[llvm] f0ac6f9 - [Transforms] Fix a warning
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 13 08:31:52 PST 2023
Author: Kazu Hirata
Date: 2023-12-13T08:31:46-08:00
New Revision: f0ac6f92a77ce2c38f803cf77c5c0a630debd570
URL: https://github.com/llvm/llvm-project/commit/f0ac6f92a77ce2c38f803cf77c5c0a630debd570
DIFF: https://github.com/llvm/llvm-project/commit/f0ac6f92a77ce2c38f803cf77c5c0a630debd570.diff
LOG: [Transforms] Fix a warning
This patch fixes:
llvm/lib/Transforms/Scalar/ConstraintElimination.cpp:1112:13: error:
unused function 'dumpUnpackedICmp' [-Werror,-Wunused-function]
Added:
Modified:
llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp b/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
index 9984276e9db34..18266ba078989 100644
--- a/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
+++ b/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
@@ -1109,6 +1109,7 @@ void State::addInfoFor(BasicBlock &BB) {
CmpI->getOperand(1)));
}
+#ifndef NDEBUG
static void dumpUnpackedICmp(raw_ostream &OS, ICmpInst::Predicate Pred,
Value *LHS, Value *RHS) {
OS << "icmp " << Pred << ' ';
@@ -1116,6 +1117,7 @@ static void dumpUnpackedICmp(raw_ostream &OS, ICmpInst::Predicate Pred,
OS << ", ";
RHS->printAsOperand(OS, /*PrintType=*/false);
}
+#endif
namespace {
/// Helper to keep track of a condition and if it should be treated as negated
More information about the llvm-commits
mailing list