Eliminate MachineFunction& argument from eliminateFrameIndex in x86 Target. Get...
[oota-llvm.git] / lib / Target / SparcV9 / SparcV9AsmPrinter.cpp
index addcbdcc0c192b9b691ff0dfa8c23de927b5b632..0be404d65393876a37bea30b14567e8aab7e882f 100644 (file)
@@ -365,23 +365,21 @@ void AsmPrinter::printConstantValueOnly(const Constant* CV,
       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);