[llvm-commits] CVS: llvm/lib/Target/SparcV9/SparcV9AsmPrinter.cpp
Alkis Evlogimenos
alkis at cs.uiuc.edu
Wed Aug 4 01:44:53 PDT 2004
Changes in directory llvm/lib/Target/SparcV9:
SparcV9AsmPrinter.cpp updated: 1.116 -> 1.117
---
Log message:
Stop using getValues().
---
Diffs of the changes: (+5 -7)
Index: llvm/lib/Target/SparcV9/SparcV9AsmPrinter.cpp
diff -u llvm/lib/Target/SparcV9/SparcV9AsmPrinter.cpp:1.116 llvm/lib/Target/SparcV9/SparcV9AsmPrinter.cpp:1.117
--- llvm/lib/Target/SparcV9/SparcV9AsmPrinter.cpp:1.116 Sat Jul 17 19:36:44 2004
+++ llvm/lib/Target/SparcV9/SparcV9AsmPrinter.cpp Wed Aug 4 03:44:43 2004
@@ -365,23 +365,21 @@
toAsm << "\t" << ".ascii" << "\t" << getAsCString(CVA) << "\n";
} else {
// Not a string. Print the values in successive locations
- const std::vector<Use> &constValues = CVA->getValues();
- for (unsigned i=0; i < constValues.size(); i++)
- printConstantValueOnly(cast<Constant>(constValues[i].get()));
+ for (unsigned i = 0, e = CVA->getNumOperands(); i != e; ++i)
+ printConstantValueOnly(CVA->getOperand(i));
}
} else if (const ConstantStruct *CVS = dyn_cast<ConstantStruct>(CV)) {
// Print the fields in successive locations. Pad to align if needed!
const StructLayout *cvsLayout =
Target.getTargetData().getStructLayout(CVS->getType());
- const std::vector<Use>& constValues = CVS->getValues();
unsigned sizeSoFar = 0;
- for (unsigned i=0, N = constValues.size(); i < N; i++) {
- const Constant* field = cast<Constant>(constValues[i].get());
+ for (unsigned i = 0, e = CVS->getNumOperands(); i != e; ++i) {
+ const Constant* field = CVS->getOperand(i);
// Check if padding is needed and insert one or more 0s.
unsigned fieldSize =
Target.getTargetData().getTypeSize(field->getType());
- int padSize = ((i == N-1? cvsLayout->StructSize
+ int padSize = ((i == e-1? cvsLayout->StructSize
: cvsLayout->MemberOffsets[i+1])
- cvsLayout->MemberOffsets[i]) - fieldSize;
sizeSoFar += (fieldSize + padSize);
More information about the llvm-commits
mailing list