From f17720633ba1182bda90491904b5f31daedab41e Mon Sep 17 00:00:00 2001 From: Vedant Kumar Date: Mon, 23 Apr 2018 17:18:24 +0000 Subject: [SelectionDAG] Dump debug locs in SDNodes This helps debug issues where selection-dag assigns the wrong location to an instruction. Differential Revision: https://reviews.llvm.org/D45913 llvm-svn: 330618 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'llvm/lib') diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp index 192141abeb9..83069bfdb44 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp @@ -834,4 +834,8 @@ void SDNode::print(raw_ostream &OS, const SelectionDAG *G) const { if (i) OS << ", "; else OS << " "; printOperand(OS, G, getOperand(i)); } + if (DebugLoc DL = getDebugLoc()) { + OS << ", "; + DL.print(OS); + } } -- cgit v1.2.3