Added a size_type typedef to LLVM containers to make Visual Studio shut up
authorReid Spencer <rspencer@reidspencer.com>
Mon, 13 Dec 2004 16:28:53 +0000 (16:28 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Mon, 13 Dec 2004 16:28:53 +0000 (16:28 +0000)
(and possibly to make LLVM more x86 64bit friendly).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18891 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/CommandLine.h
include/llvm/Type.h
include/llvm/Value.h

index d3023e5cb360dba29eac038d128b064846cf4bdc..90f38bce2dc468e6766f32fddb861b756603d412 100644 (file)
@@ -435,7 +435,7 @@ public:
   typedef DataType parser_data_type;
 
   // Implement virtual functions needed by generic_parser_base
-  unsigned getNumOptions() const { return Values.size(); }
+  unsigned getNumOptions() const { return (unsigned)Values.size(); }
   const char *getOption(unsigned N) const { return Values[N].first; }
   const char *getDescription(unsigned N) const {
     return Values[N].second.second;
index 18b8adb0cee0d8ad50819bec7cec55eb8d11ea5a..20a3d6d03ef136cc179e484a7e39cc2a77433fd3 100644 (file)
@@ -246,7 +246,8 @@ public:
 
   /// getNumContainedTypes - Return the number of types in the derived type.
   ///
-  unsigned getNumContainedTypes() const { return ContainedTys.size(); }
+  typedef std::vector<PATypeHandle>::size_type size_type;
+  size_type getNumContainedTypes() const { return ContainedTys.size(); }
 
   //===--------------------------------------------------------------------===//
   // Static members exported by the Type class itself.  Useful for getting
index ab1707884f0bae433c2cdd257822c74d505c3382..2e618a5e863fd127f7883f0e007db9d49510490a 100644 (file)
@@ -89,8 +89,9 @@ public:
   //
   typedef UseListIteratorWrapper      use_iterator;
   typedef UseListConstIteratorWrapper use_const_iterator;
+  typedef iplist<Use>::size_type      size_type;
 
-  unsigned           use_size()  const { return Uses.size();  }
+  size_type          use_size()  const { return Uses.size();  }
   bool               use_empty() const { return Uses.empty(); }
   use_iterator       use_begin()       { return Uses.begin(); }
   use_const_iterator use_begin() const { return Uses.begin(); }