diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-02-11 23:42:39 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-02-11 23:42:39 +0000 |
commit | 6f6abfd94baa8420a9d53c86c282c37175401f35 (patch) | |
tree | 1c29507cff01825faa3c8114c4a55941636dabb7 /llvm/lib/CodeGen/ScheduleDAGPrinter.cpp | |
parent | eb5ec4a0db14948a06026d5a0be3cdb4f49ce590 (diff) | |
download | bcm5719-llvm-6f6abfd94baa8420a9d53c86c282c37175401f35.tar.gz bcm5719-llvm-6f6abfd94baa8420a9d53c86c282c37175401f35.zip |
Apparently some MachineBasicBlock's don't have corresponding llvm basic blocks.
llvm-svn: 64340
Diffstat (limited to 'llvm/lib/CodeGen/ScheduleDAGPrinter.cpp')
-rw-r--r-- | llvm/lib/CodeGen/ScheduleDAGPrinter.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/ScheduleDAGPrinter.cpp b/llvm/lib/CodeGen/ScheduleDAGPrinter.cpp index e2ae5a03c13..594c24d11d1 100644 --- a/llvm/lib/CodeGen/ScheduleDAGPrinter.cpp +++ b/llvm/lib/CodeGen/ScheduleDAGPrinter.cpp @@ -83,9 +83,13 @@ std::string DOTGraphTraits<ScheduleDAG*>::getNodeLabel(const SUnit *SU, void ScheduleDAG::viewGraph() { // This code is only for debugging! #ifndef NDEBUG - ViewGraph(this, "dag." + MF.getFunction()->getName(), - "Scheduling-Units Graph for " + MF.getFunction()->getName() + ':' + - BB->getBasicBlock()->getName()); + if (BB->getBasicBlock()) + ViewGraph(this, "dag." + MF.getFunction()->getName(), + "Scheduling-Units Graph for " + MF.getFunction()->getName() + ':' + + BB->getBasicBlock()->getName()); + else + ViewGraph(this, "dag." + MF.getFunction()->getName(), + "Scheduling-Units Graph for " + MF.getFunction()->getName()); #else cerr << "ScheduleDAG::viewGraph is only available in debug builds on " << "systems with Graphviz or gv!\n"; |