[Mlir-commits] [mlir] 8e640ca - [mlir] Fixed warning related to unused variable in Liveness.

Marcel Koester llvmlistbot at llvm.org
Mon Apr 27 05:03:39 PDT 2020


Author: Marcel Koester
Date: 2020-04-27T14:02:33+02:00
New Revision: 8e640ca5a838b904250bf57d3200090e331e0d5d

URL: https://github.com/llvm/llvm-project/commit/8e640ca5a838b904250bf57d3200090e331e0d5d
DIFF: https://github.com/llvm/llvm-project/commit/8e640ca5a838b904250bf57d3200090e331e0d5d.diff

LOG: [mlir] Fixed warning related to unused variable in Liveness.

The latest changes of the Liveness analysis caused a warning related to an
unused variable. This commit solves this warning.

Differential Revision: https://reviews.llvm.org/D78912

Added: 
    

Modified: 
    mlir/lib/Analysis/Liveness.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Analysis/Liveness.cpp b/mlir/lib/Analysis/Liveness.cpp
index dcbde68cc059..38fb386f8000 100644
--- a/mlir/lib/Analysis/Liveness.cpp
+++ b/mlir/lib/Analysis/Liveness.cpp
@@ -297,7 +297,7 @@ void Liveness::print(raw_ostream &os) const {
 
   // Local printing helpers
   auto printValueRef = [&](Value value) {
-    if (Operation *defOp = value.getDefiningOp())
+    if (value.getDefiningOp())
       os << "val_" << valueIds[value];
     else {
       auto blockArg = value.cast<BlockArgument>();


        


More information about the Mlir-commits mailing list