diff options
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index ce882e6f6e..2bd1739501 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -922,9 +922,12 @@ void SDNode::dump() const { void SelectionDAG::dump() const { std::cerr << "SelectionDAG has " << AllNodes.size() << " nodes:"; - for (unsigned i = 0, e = AllNodes.size(); i != e; ++i) { + std::vector<SDNode*> Nodes(AllNodes); + std::sort(Nodes.begin(), Nodes.end()); + + for (unsigned i = 0, e = Nodes.size(); i != e; ++i) { std::cerr << "\n "; - AllNodes[i]->dump(); + Nodes[i]->dump(); } std::cerr << "\n\n"; } |