aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/X86
diff options
context:
space:
mode:
authorAlkis Evlogimenos <alkis@evlogimenos.com>2004-08-04 08:44:43 +0000
committerAlkis Evlogimenos <alkis@evlogimenos.com>2004-08-04 08:44:43 +0000
commit15876bb28c9c0983279c30a123c13224648574c1 (patch)
tree71be0cb152de7836179ef3dfedb7ad9869551e5f /lib/Target/X86
parent868bbf35b079a7f356f6b2fbd9df7e66552bc57e (diff)
downloadexternal_llvm-15876bb28c9c0983279c30a123c13224648574c1.zip
external_llvm-15876bb28c9c0983279c30a123c13224648574c1.tar.gz
external_llvm-15876bb28c9c0983279c30a123c13224648574c1.tar.bz2
Stop using getValues().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15487 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86')
-rw-r--r--lib/Target/X86/X86AsmPrinter.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/Target/X86/X86AsmPrinter.cpp b/lib/Target/X86/X86AsmPrinter.cpp
index 5bc4a48..f8c582f 100644
--- a/lib/Target/X86/X86AsmPrinter.cpp
+++ b/lib/Target/X86/X86AsmPrinter.cpp
@@ -270,22 +270,20 @@ void X86AsmPrinter::emitGlobalConstant(const Constant *CV) {
printAsCString(O, CVA);
O << "\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++)
- emitGlobalConstant(cast<Constant>(constValues[i].get()));
+ for (unsigned i = 0, e = CVA->getNumOperands(); i != e; ++i)
+ emitGlobalConstant(CVA->getOperand(i));
}
return;
} else if (const ConstantStruct *CVS = dyn_cast<ConstantStruct>(CV)) {
// Print the fields in successive locations. Pad to align if needed!
const StructLayout *cvsLayout = TD.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 = TD.getTypeSize(field->getType());
- unsigned padSize = ((i == N-1? cvsLayout->StructSize
+ unsigned padSize = ((i == e-1? cvsLayout->StructSize
: cvsLayout->MemberOffsets[i+1])
- cvsLayout->MemberOffsets[i]) - fieldSize;
sizeSoFar += fieldSize + padSize;