diff options
author | Vedant Kumar <vsk@apple.com> | 2018-04-23 17:18:24 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2018-04-23 17:18:24 +0000 |
commit | f17720633ba1182bda90491904b5f31daedab41e (patch) | |
tree | 6b951d028202b7cf7afec23aa3a489449d58b1fa /llvm/lib | |
parent | e8643a0c91c0ee98331159983a5f26106dfe8d96 (diff) | |
download | bcm5719-llvm-f17720633ba1182bda90491904b5f31daedab41e.tar.gz bcm5719-llvm-f17720633ba1182bda90491904b5f31daedab41e.zip |
[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
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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); + } } |