diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2009-11-20 01:17:03 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2009-11-20 01:17:03 +0000 |
commit | 324da7647cfc3025e0c987176f0a300f9f780e6f (patch) | |
tree | 56374dc2107fe1ce80ef47b98fbfb3b879a1f33c /lib/CodeGen/LiveIntervalAnalysis.cpp | |
parent | ac146657fc2dc63e9856e0090fd0bec4ba9befd3 (diff) | |
download | external_llvm-324da7647cfc3025e0c987176f0a300f9f780e6f.zip external_llvm-324da7647cfc3025e0c987176f0a300f9f780e6f.tar.gz external_llvm-324da7647cfc3025e0c987176f0a300f9f780e6f.tar.bz2 |
Add MachineBasicBlock::getName, and use it in place of getBasicBlock()->getName.
Fix debug code that assumes getBasicBlock never returns NULL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89428 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r-- | lib/CodeGen/LiveIntervalAnalysis.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index bbfc82b..56a9c56 100644 --- a/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -136,7 +136,7 @@ void LiveIntervals::printInstrs(raw_ostream &OS) const { for (MachineFunction::iterator mbbi = mf_->begin(), mbbe = mf_->end(); mbbi != mbbe; ++mbbi) { - OS << ((Value*)mbbi->getBasicBlock())->getName() << ":\n"; + OS << mbbi->getName() << ":\n"; for (MachineBasicBlock::iterator mii = mbbi->begin(), mie = mbbi->end(); mii != mie; ++mii) { OS << getInstructionIndex(mii) << '\t' << *mii; @@ -658,7 +658,7 @@ void LiveIntervals::computeIntervals() { MachineBasicBlock *MBB = MBBI; // Track the index of the current machine instr. SlotIndex MIIndex = getMBBStartIdx(MBB); - DEBUG(errs() << ((Value*)MBB->getBasicBlock())->getName() << ":\n"); + DEBUG(errs() << MBB->getName() << ":\n"); MachineBasicBlock::iterator MI = MBB->begin(), miEnd = MBB->end(); |