[llvm] 0defd83 - [AArch64] Avoid unused variable warnings in release builds

Benjamin Kramer via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 6 05:57:19 PDT 2025


Author: Benjamin Kramer
Date: 2025-04-06T14:56:33+02:00
New Revision: 0defd832eb7c0618a67556e6fcbd32dd19e88b97

URL: https://github.com/llvm/llvm-project/commit/0defd832eb7c0618a67556e6fcbd32dd19e88b97
DIFF: https://github.com/llvm/llvm-project/commit/0defd832eb7c0618a67556e6fcbd32dd19e88b97.diff

LOG: [AArch64] Avoid unused variable warnings in release builds

This used to be under !NDEBUG before
0a1742708ddc3a2b31d65479aaad143b5f7562b2, so just put that back. The
code only consists of assertions.

Added: 
    

Modified: 
    llvm/lib/Target/AArch64/AArch64SelectionDAGInfo.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AArch64/AArch64SelectionDAGInfo.cpp b/llvm/lib/Target/AArch64/AArch64SelectionDAGInfo.cpp
index da2cd1ada3653..2273e1c0ffa6e 100644
--- a/llvm/lib/Target/AArch64/AArch64SelectionDAGInfo.cpp
+++ b/llvm/lib/Target/AArch64/AArch64SelectionDAGInfo.cpp
@@ -35,6 +35,7 @@ bool AArch64SelectionDAGInfo::isTargetStrictFPOpcode(unsigned Opcode) const {
 
 void AArch64SelectionDAGInfo::verifyTargetNode(const SelectionDAG &DAG,
                                                const SDNode *N) const {
+#ifndef NDEBUG
   switch (N->getOpcode()) {
   default:
     break;
@@ -110,6 +111,7 @@ void AArch64SelectionDAGInfo::verifyTargetNode(const SelectionDAG &DAG,
     break;
   }
   }
+#endif
 }
 
 SDValue AArch64SelectionDAGInfo::EmitMOPS(unsigned Opcode, SelectionDAG &DAG,


        


More information about the llvm-commits mailing list