mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Convert code to compile with vc7.1.
Patch contributed by Paolo Invernizzi. Thanks Paolo! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16368 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -50,16 +50,17 @@ llvm::CloneTrace(const std::vector<BasicBlock*> &origTrace) {
|
||||
//only do this if we are NOT the first block
|
||||
if(T != origTrace.begin()) {
|
||||
for (BasicBlock::iterator I = clonedBlock->begin();
|
||||
PHINode *PN = dyn_cast<PHINode>(I); ++I) {
|
||||
//get incoming value for the previous BB
|
||||
Value *V = PN->getIncomingValueForBlock(*(T-1));
|
||||
assert(V && "No incoming value from a BasicBlock in our trace!");
|
||||
|
||||
//remap our phi node to point to incoming value
|
||||
ValueMap[*&I] = V;
|
||||
|
||||
//remove phi node
|
||||
clonedBlock->getInstList().erase(PN);
|
||||
isa<PHINode>(I); ++I) {
|
||||
PHINode *PN = cast<PHINode>(I);
|
||||
//get incoming value for the previous BB
|
||||
Value *V = PN->getIncomingValueForBlock(*(T-1));
|
||||
assert(V && "No incoming value from a BasicBlock in our trace!");
|
||||
|
||||
//remap our phi node to point to incoming value
|
||||
ValueMap[*&I] = V;
|
||||
|
||||
//remove phi node
|
||||
clonedBlock->getInstList().erase(PN);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user