mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85699 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -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();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user