diff options
author | Chris Lattner <sabre@nondot.org> | 2004-08-04 17:27:27 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-08-04 17:27:27 +0000 |
commit | cdf70128606e5271dd20ffaf8a1261bdd69b1c53 (patch) | |
tree | 02913d98b314638f8122d85d748c0def2748003f /lib/Target/SparcV8 | |
parent | 706515727c6d024015fffded2b3109a4f0ac5299 (diff) | |
download | external_llvm-cdf70128606e5271dd20ffaf8a1261bdd69b1c53.zip external_llvm-cdf70128606e5271dd20ffaf8a1261bdd69b1c53.tar.gz external_llvm-cdf70128606e5271dd20ffaf8a1261bdd69b1c53.tar.bz2 |
getValues is gone
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15494 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SparcV8')
-rw-r--r-- | lib/Target/SparcV8/SparcV8AsmPrinter.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/Target/SparcV8/SparcV8AsmPrinter.cpp b/lib/Target/SparcV8/SparcV8AsmPrinter.cpp index 973d7e4..6c3bd76 100644 --- a/lib/Target/SparcV8/SparcV8AsmPrinter.cpp +++ b/lib/Target/SparcV8/SparcV8AsmPrinter.cpp @@ -212,22 +212,20 @@ void V8Printer::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; |