From 986841cca24139a20ebbcd8f8c8684aeb1812641 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Fri, 30 Jul 2021 17:32:01 +0100 Subject: [PATCH] SelectionDAGDumper.cpp - printrWithDepthHelper - remove dead code. NFCI. Fixes coverity warning - we have an early-out for unsigned depth == 0, so the depth < 1 early-out later on is dead code. --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp index 40083c6..757f949 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp @@ -1012,15 +1012,12 @@ static void printrWithDepthHelper(raw_ostream &OS, const SDNode *N, N->print(OS, G); - if (depth < 1) - return; - for (const SDValue &Op : N->op_values()) { // Don't follow chain operands. if (Op.getValueType() == MVT::Other) continue; OS << '\n'; - printrWithDepthHelper(OS, Op.getNode(), G, depth-1, indent+2); + printrWithDepthHelper(OS, Op.getNode(), G, depth - 1, indent + 2); } } -- 2.7.4