[llvm-commits] CVS: llvm/lib/Linker/LinkModules.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu Jan 19 15:16:10 PST 2006
Changes in directory llvm/lib/Linker:
LinkModules.cpp updated: 1.108 -> 1.109
---
Log message:
add support for ConstantPacked to the linker
---
Diffs of the changes: (+5 -0)
LinkModules.cpp | 5 +++++
1 files changed, 5 insertions(+)
Index: llvm/lib/Linker/LinkModules.cpp
diff -u llvm/lib/Linker/LinkModules.cpp:1.108 llvm/lib/Linker/LinkModules.cpp:1.109
--- llvm/lib/Linker/LinkModules.cpp:1.108 Tue Dec 6 11:30:58 2005
+++ llvm/lib/Linker/LinkModules.cpp Thu Jan 19 17:15:58 2006
@@ -290,6 +290,11 @@
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);
More information about the llvm-commits
mailing list