diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2004-12-13 16:28:53 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2004-12-13 16:28:53 +0000 |
commit | 4251ce4b10a35552df67ea624b180ad247960eef (patch) | |
tree | f9c8a886fd07d469b637db6492abb9bc51f53543 | |
parent | 0982d081056f64d7245ba26368d20de33e206ff9 (diff) | |
download | external_llvm-4251ce4b10a35552df67ea624b180ad247960eef.zip external_llvm-4251ce4b10a35552df67ea624b180ad247960eef.tar.gz external_llvm-4251ce4b10a35552df67ea624b180ad247960eef.tar.bz2 |
Added a size_type typedef to LLVM containers to make Visual Studio shut up
(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
-rw-r--r-- | include/llvm/Support/CommandLine.h | 2 | ||||
-rw-r--r-- | include/llvm/Type.h | 3 | ||||
-rw-r--r-- | include/llvm/Value.h | 3 |
3 files changed, 5 insertions, 3 deletions
diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h index d3023e5..90f38bc 100644 --- a/include/llvm/Support/CommandLine.h +++ b/include/llvm/Support/CommandLine.h @@ -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; diff --git a/include/llvm/Type.h b/include/llvm/Type.h index 18b8adb..20a3d6d 100644 --- a/include/llvm/Type.h +++ b/include/llvm/Type.h @@ -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 diff --git a/include/llvm/Value.h b/include/llvm/Value.h index ab17078..2e618a5 100644 --- a/include/llvm/Value.h +++ b/include/llvm/Value.h @@ -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(); } |