Use Function's arg_size() and size() methods.
[oota-llvm.git] / include / llvm / Bitcode / BitCodes.h
index 1d3087c5a0c9a95f3bc0ed261ea501741afb0a44..f140cc3b19d912ac77e1037e3e7d611e8e5b9f70 100644 (file)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file was developed by Chris Lattner and is distributed under
-// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 //
@@ -91,8 +91,8 @@ public:
     Char6 = 4   // A 6-bit fixed field which maps to [a-zA-Z0-9._].
   };
     
-  BitCodeAbbrevOp(uint64_t V) :  Val(V), IsLiteral(true) {}
-  BitCodeAbbrevOp(Encoding E, uint64_t Data = 0)
+  explicit BitCodeAbbrevOp(uint64_t V) :  Val(V), IsLiteral(true) {}
+  explicit BitCodeAbbrevOp(Encoding E, uint64_t Data = 0)
     : Val(Data), IsLiteral(false), Enc(E) {}
   
   bool isLiteral() const { return IsLiteral; }
@@ -136,6 +136,7 @@ public:
     if (C == '.') return 62;
     if (C == '_') return 63;
     assert(0 && "Not a value Char6 character!");
+    return 0;
   }
   
   static char DecodeChar6(unsigned V) {
@@ -146,6 +147,7 @@ public:
     if (V == 62) return '.';
     if (V == 63) return '_';
     assert(0 && "Not a value Char6 character!");
+    return ' ';
   }
   
 };
@@ -163,7 +165,9 @@ public:
   void addRef() { ++RefCount; }
   void dropRef() { if (--RefCount == 0) delete this; }
 
-  unsigned getNumOperandInfos() const { return OperandList.size(); }
+  unsigned getNumOperandInfos() const {
+    return static_cast<unsigned>(OperandList.size());
+  }
   const BitCodeAbbrevOp &getOperandInfo(unsigned N) const {
     return OperandList[N];
   }