mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
add support for ConstantPacked to the linker
llvm-svn: 25467
This commit is contained in:
parent
38c4921912
commit
3158146649
@ -290,6 +290,11 @@ static Value *RemapOperand(const Value *In,
|
||||
Result = const_cast<Constant*>(CPV);
|
||||
} else if (isa<GlobalValue>(CPV)) {
|
||||
Result = cast<Constant>(RemapOperand(CPV, ValueMap));
|
||||
} else if (const ConstantPacked *CP = dyn_cast<ConstantPacked>(CPV)) {
|
||||
std::vector<Constant*> Operands(CP->getNumOperands());
|
||||
for (unsigned i = 0, e = CP->getNumOperands(); i != e; ++i)
|
||||
Operands[i] = cast<Constant>(RemapOperand(CP->getOperand(i), ValueMap));
|
||||
Result = ConstantPacked::get(Operands);
|
||||
} else if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(CPV)) {
|
||||
if (CE->getOpcode() == Instruction::GetElementPtr) {
|
||||
Value *Ptr = RemapOperand(CE->getOperand(0), ValueMap);
|
||||
|
Loading…
Reference in New Issue
Block a user