Revert 85678/85680. The decision is to stay with the current form of

indirectbr, thus we don't need "blockaddr(@func, null)".  Eliminate it
for simplicity.

llvm-svn: 85699
This commit is contained in:
Chris Lattner committed 2009-11-01 01:27:45 +00:00
1 parent 6f29ad9170
commit aa99c94e2a
11 files changed
+25 -47

No files matched your search

+2 -3
View File
@@ -2274,12 +2274,11 @@ bool BitcodeReader::ParseFunctionBody(Function *F) {
std::vector<BlockAddrRefTy> &RefList = BAFRI->second;
for (unsigned i = 0, e = RefList.size(); i != e; ++i) {
unsigned BlockIdx = RefList[i].first;
if (BlockIdx > FunctionBBs.size())
if (BlockIdx >= FunctionBBs.size())
return Error("Invalid blockaddress block #");
GlobalVariable *FwdRef = RefList[i].second;
BasicBlock *BB = BlockIdx == 0 ? 0 : FunctionBBs[BlockIdx-1];
FwdRef->replaceAllUsesWith(BlockAddress::get(F, BB));
FwdRef->replaceAllUsesWith(BlockAddress::get(F, FunctionBBs[BlockIdx]));
FwdRef->eraseFromParent();
}