Fix crash when compiling twolf.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10584 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Alkis Evlogimenos 2003-12-22 13:54:29 +00:00
parent 500597a1c3
commit 056063e264

View File

@ -146,7 +146,8 @@ void LiveIntervals::handleVirtualRegisterDef(MachineBasicBlock* mbb,
unsigned liveBlockIndex = it->first;
MachineBasicBlock* liveBlock = it->second;
if (liveBlockIndex < vi.AliveBlocks.size() &&
vi.AliveBlocks[liveBlockIndex]) {
vi.AliveBlocks[liveBlockIndex] &&
!liveBlock->empty()) {
unsigned start = getInstructionIndex(liveBlock->front());
unsigned end = getInstructionIndex(liveBlock->back()) + 1;
interval->addRange(start, end);