Eliminate std::vectors from the bcanalyzer interface.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33978 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Bytecode/Reader/Analyzer.cpp b/lib/Bytecode/Reader/Analyzer.cpp
index 71cb4b2..94224e3 100644
--- a/lib/Bytecode/Reader/Analyzer.cpp
+++ b/lib/Bytecode/Reader/Analyzer.cpp
@@ -359,13 +359,13 @@
   }
 
   virtual bool handleInstruction( unsigned Opcode, const Type* iType,
-                                std::vector<unsigned>& Operands, 
+                                unsigned *Operands, unsigned NumOps, 
                                 Instruction *Inst,
                                 unsigned Size){
     if (os) {
       *os << "        INST: OpCode="
          << Instruction::getOpcodeName(Opcode);
-      for ( unsigned i = 0; i < Operands.size(); ++i )
+      for (unsigned i = 0; i != NumOps; ++i)
         *os << " Op(" << Operands[i] << ")";
       *os << *Inst;
     }
@@ -374,15 +374,15 @@
     bca.numValues++;
     bca.instructionSize += Size;
     if (Size > 4 ) bca.longInstructions++;
-    bca.numOperands += Operands.size();
-    for (unsigned i = 0; i < Operands.size(); ++i )
+    bca.numOperands += NumOps;
+    for (unsigned i = 0; i != NumOps; ++i)
       if (Operands[i] > bca.maxValueSlot)
         bca.maxValueSlot = Operands[i];
     if ( currFunc ) {
       currFunc->numInstructions++;
       currFunc->instructionSize += Size;
       if (Size > 4 ) currFunc->longInstructions++;
-      if ( Opcode == Instruction::PHI ) currFunc->numPhis++;
+      if (Opcode == Instruction::PHI) currFunc->numPhis++;
     }
     return Instruction::isTerminator(Opcode);
   }
@@ -397,11 +397,11 @@
       *os << "    BLOCK: GlobalConstants {\n";
   }
 
-  virtual void handleConstantExpression( unsigned Opcode,
-      std::vector<Constant*> ArgVec, Constant* C ) {
+  virtual void handleConstantExpression(unsigned Opcode,
+      Constant**ArgVec, unsigned NumArgs, Constant* C) {
     if (os) {
       *os << "      EXPR: " << Instruction::getOpcodeName(Opcode) << "\n";
-      for ( unsigned i = 0; i < ArgVec.size(); ++i ) {
+      for ( unsigned i = 0; i != NumArgs; ++i ) {
         *os << "        Arg#" << i << " "; ArgVec[i]->print(*os);
         *os << "\n";
       }
@@ -424,14 +424,14 @@
   }
 
   virtual void handleConstantArray( const ArrayType* AT,
-          std::vector<Constant*>& Elements,
+          Constant**Elements, unsigned NumElts,
           unsigned TypeSlot,
           Constant* ArrayVal ) {
     if (os) {
       *os << "      ARRAY: ";
       WriteTypeSymbolic(*os,AT,M);
       *os << " TypeSlot=" << TypeSlot << "\n";
-      for ( unsigned i = 0; i < Elements.size(); ++i ) {
+      for (unsigned i = 0; i != NumElts; ++i) {
         *os << "        #" << i;
         Elements[i]->print(*os);
         *os << "\n";
@@ -447,14 +447,14 @@
 
   virtual void handleConstantStruct(
         const StructType* ST,
-        std::vector<Constant*>& Elements,
+        Constant**Elements, unsigned NumElts,
         Constant* StructVal)
   {
     if (os) {
       *os << "      STRUC: ";
       WriteTypeSymbolic(*os,ST,M);
       *os << "\n";
-      for ( unsigned i = 0; i < Elements.size(); ++i ) {
+      for ( unsigned i = 0; i != NumElts; ++i) {
         *os << "        #" << i << " "; Elements[i]->print(*os);
         *os << "\n";
       }
@@ -468,7 +468,7 @@
 
   virtual void handleConstantPacked(
     const PackedType* PT,
-    std::vector<Constant*>& Elements,
+    Constant**Elements, unsigned NumElts,
     unsigned TypeSlot,
     Constant* PackedVal)
   {
@@ -476,7 +476,7 @@
       *os << "      PACKD: ";
       WriteTypeSymbolic(*os,PT,M);
       *os << " TypeSlot=" << TypeSlot << "\n";
-      for ( unsigned i = 0; i < Elements.size(); ++i ) {
+      for ( unsigned i = 0; i != NumElts; ++i ) {
         *os << "        #" << i;
         Elements[i]->print(*os);
         *os << "\n";