diff options
| author | Chris Lattner <sabre@nondot.org> | 2004-08-04 17:29:14 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2004-08-04 17:29:14 +0000 | 
| commit | 08c58e63d99cb23c292a4415cac9bffbc932d986 (patch) | |
| tree | bb5af3ab9637c821b50176a54f5041c3e04d8b12 /llvm/lib | |
| parent | 50c6df4ba0cf2c2a83e0ee3ae595a2f3fd72b610 (diff) | |
| download | bcm5719-llvm-08c58e63d99cb23c292a4415cac9bffbc932d986.tar.gz bcm5719-llvm-08c58e63d99cb23c292a4415cac9bffbc932d986.zip | |
getValues does not exist
llvm-svn: 15495
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPC32AsmPrinter.cpp | 12 | ||||
| -rw-r--r-- | llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp | 12 | 
2 files changed, 10 insertions, 14 deletions
| diff --git a/llvm/lib/Target/PowerPC/PPC32AsmPrinter.cpp b/llvm/lib/Target/PowerPC/PPC32AsmPrinter.cpp index e8fb31edb60..62deac0a5bb 100644 --- a/llvm/lib/Target/PowerPC/PPC32AsmPrinter.cpp +++ b/llvm/lib/Target/PowerPC/PPC32AsmPrinter.cpp @@ -231,22 +231,20 @@ void Printer::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; diff --git a/llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp index e8fb31edb60..62deac0a5bb 100644 --- a/llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp +++ b/llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp @@ -231,22 +231,20 @@ void Printer::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; | 

