[llvm] 56b4b6e - [SDAG] Fix release build

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 18 05:10:39 PDT 2022


Author: Nikita Popov
Date: 2022-07-18T14:10:31+02:00
New Revision: 56b4b6e81b889080dd479b54d8cf48f4c20ba0e1

URL: https://github.com/llvm/llvm-project/commit/56b4b6e81b889080dd479b54d8cf48f4c20ba0e1
DIFF: https://github.com/llvm/llvm-project/commit/56b4b6e81b889080dd479b54d8cf48f4c20ba0e1.diff

LOG: [SDAG] Fix release build

This variable was only declared in debug builds, but is needed
in release builds as well.

Added: 
    

Modified: 
    llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
index efa9a09eab3b..c5c093ae228f 100644
--- a/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
@@ -1226,12 +1226,12 @@ void SelectionDAGBuilder::visitGCResult(const GCResultInst &CI) {
 }
 
 void SelectionDAGBuilder::visitGCRelocate(const GCRelocateInst &Relocate) {
+  const Value *Statepoint = Relocate.getStatepoint();
 #ifndef NDEBUG
   // Consistency check
   // We skip this check for relocates not in the same basic block as their
   // statepoint. It would be too expensive to preserve validation info through
   // 
diff erent basic blocks.
-  const Value *Statepoint = Relocate.getStatepoint();
   assert((isa<GCStatepointInst>(Statepoint) || isa<UndefValue>(Statepoint)) &&
          "GetStatepoint must return one of two types");
   if (isa<UndefValue>(Statepoint))


        


More information about the llvm-commits mailing list