[llvm] e0e4818 - [CodeGen] Fix a warning
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 8 16:31:51 PST 2023
Author: Kazu Hirata
Date: 2023-01-08T16:31:45-08:00
New Revision: e0e48187e6d8c395237964effe01205de138a708
URL: https://github.com/llvm/llvm-project/commit/e0e48187e6d8c395237964effe01205de138a708
DIFF: https://github.com/llvm/llvm-project/commit/e0e48187e6d8c395237964effe01205de138a708.diff
LOG: [CodeGen] Fix a warning
This patch fixes:
llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp:1220:13: error:
unused function 'locStr' [-Werror,-Wunused-function]
Added:
Modified:
llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp b/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
index 2049ada7ad9a..f553da4ae5e7 100644
--- a/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
+++ b/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
@@ -1217,6 +1217,7 @@ bool AssignmentTrackingLowering::hasVarWithAssignment(VariableID Var,
return true;
}
+#ifndef NDEBUG
const char *locStr(AssignmentTrackingLowering::LocKind Loc) {
using LocKind = AssignmentTrackingLowering::LocKind;
switch (Loc) {
@@ -1229,6 +1230,7 @@ const char *locStr(AssignmentTrackingLowering::LocKind Loc) {
};
llvm_unreachable("unknown LocKind");
}
+#endif
void AssignmentTrackingLowering::emitDbgValue(
AssignmentTrackingLowering::LocKind Kind,
More information about the llvm-commits
mailing list