mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-13 15:11:39 +00:00
Fix linking of constant expr casts due to type resolution changes. With
this and the other patches 253.perlbmk links again. llvm-svn: 12565
This commit is contained in:
parent
5a789b5e06
commit
1c0ddbfb7d
@ -325,6 +325,14 @@ static Value *RemapOperand(const Value *In,
|
||||
assert(CE->getOpcode() == Instruction::Cast);
|
||||
Value *V = RemapOperand(CE->getOperand(0), LocalMap, GlobalMap);
|
||||
Result = ConstantExpr::getCast(cast<Constant>(V), CE->getType());
|
||||
} else if (CE->getNumOperands() == 3) {
|
||||
// Select instruction
|
||||
assert(CE->getOpcode() == Instruction::Select);
|
||||
Value *V1 = RemapOperand(CE->getOperand(0), LocalMap, GlobalMap);
|
||||
Value *V2 = RemapOperand(CE->getOperand(1), LocalMap, GlobalMap);
|
||||
Value *V3 = RemapOperand(CE->getOperand(2), LocalMap, GlobalMap);
|
||||
Result = ConstantExpr::getSelect(cast<Constant>(V1), cast<Constant>(V2),
|
||||
cast<Constant>(V3));
|
||||
} else if (CE->getNumOperands() == 2) {
|
||||
// Binary operator...
|
||||
Value *V1 = RemapOperand(CE->getOperand(0), LocalMap, GlobalMap);
|
||||
|
Loading…
x
Reference in New Issue
Block a user