[llvm-commits] CVS: llvm/lib/ExecutionEngine/ExecutionEngine.cpp
Alkis Evlogimenos
alkis at cs.uiuc.edu
Wed Aug 4 01:41:05 PDT 2004
Changes in directory llvm/lib/ExecutionEngine:
ExecutionEngine.cpp updated: 1.56 -> 1.57
---
Log message:
Stop using getValues().
---
Diffs of the changes: (+4 -7)
Index: llvm/lib/ExecutionEngine/ExecutionEngine.cpp
diff -u llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.56 llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.57
--- llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.56 Sat Jul 17 19:41:27 2004
+++ llvm/lib/ExecutionEngine/ExecutionEngine.cpp Wed Aug 4 03:40:55 2004
@@ -446,11 +446,10 @@
switch (Init->getType()->getTypeID()) {
case Type::ArrayTyID: {
const ConstantArray *CPA = cast<ConstantArray>(Init);
- const std::vector<Use> &Val = CPA->getValues();
unsigned ElementSize =
getTargetData().getTypeSize(cast<ArrayType>(CPA->getType())->getElementType());
- for (unsigned i = 0; i < Val.size(); ++i)
- InitializeMemory(cast<Constant>(Val[i].get()), (char*)Addr+i*ElementSize);
+ for (unsigned i = 0, e = CPA->getNumOperands(); i != e; ++i)
+ InitializeMemory(CPA->getOperand(i), (char*)Addr+i*ElementSize);
return;
}
@@ -458,10 +457,8 @@
const ConstantStruct *CPS = cast<ConstantStruct>(Init);
const StructLayout *SL =
getTargetData().getStructLayout(cast<StructType>(CPS->getType()));
- const std::vector<Use> &Val = CPS->getValues();
- for (unsigned i = 0; i < Val.size(); ++i)
- InitializeMemory(cast<Constant>(Val[i].get()),
- (char*)Addr+SL->MemberOffsets[i]);
+ for (unsigned i = 0, e = CPS->getNumOperands(); i != e; ++i)
+ InitializeMemory(CPS->getOperand(i), (char*)Addr+SL->MemberOffsets[i]);
return;
}
More information about the llvm-commits
mailing list