[llvm-commits] [llvm] r64340 - /llvm/trunk/lib/CodeGen/ScheduleDAGPrinter.cpp
Evan Cheng
evan.cheng at apple.com
Wed Feb 11 15:42:39 PST 2009
Author: evancheng
Date: Wed Feb 11 17:42:39 2009
New Revision: 64340
URL: http://llvm.org/viewvc/llvm-project?rev=64340&view=rev
Log:
Apparently some MachineBasicBlock's don't have corresponding llvm basic blocks.
Modified:
llvm/trunk/lib/CodeGen/ScheduleDAGPrinter.cpp
Modified: llvm/trunk/lib/CodeGen/ScheduleDAGPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ScheduleDAGPrinter.cpp?rev=64340&r1=64339&r2=64340&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/ScheduleDAGPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/ScheduleDAGPrinter.cpp Wed Feb 11 17:42:39 2009
@@ -83,9 +83,13 @@
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";
More information about the llvm-commits
mailing list