[llvm] r370870 - [LiveDebugValues][NFC] Silence an unused variable warning

Jeremy Morse via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 4 03:18:03 PDT 2019


Author: jmorse
Date: Wed Sep  4 03:18:03 2019
New Revision: 370870

URL: http://llvm.org/viewvc/llvm-project?rev=370870&view=rev
Log:
[LiveDebugValues][NFC] Silence an unused variable warning

On release builds, 'MI' isn't used by anything (it's already inserted into a
block by BuildMI), while on non-release builds it's used by a LLVM_DEBUG
statement. Mark as explicitly used to avoid the warning.

Modified:
    llvm/trunk/lib/CodeGen/LiveDebugValues.cpp

Modified: llvm/trunk/lib/CodeGen/LiveDebugValues.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveDebugValues.cpp?rev=370870&r1=370869&r2=370870&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveDebugValues.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveDebugValues.cpp Wed Sep  4 03:18:03 2019
@@ -1172,6 +1172,7 @@ void LiveDebugValues::flushPendingLocs(V
                      DebugInstr->getDesc(), IsIndirect, Reg,
                      DebugInstr->getDebugVariable(), DebugExpr);
       }
+      (void)MI;
       LLVM_DEBUG(dbgs() << "Inserted: "; MI->dump(););
     }
   }




More information about the llvm-commits mailing list