diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2005-05-15 16:13:11 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2005-05-15 16:13:11 +0000 |
commit | edd5d9ece15f73ec1a31423a4ae39774aa6c521c (patch) | |
tree | 0cf64cf1cf786dfc0af67d7f048e4e26a86738d3 /include/llvm/DerivedTypes.h | |
parent | 98a493c7cef0b81d499eae82a1f9b748d5e59eeb (diff) |
Some cleanups for compilation with GCC 4.0.0 to remove warnings:
* Use C++ style casts, not C style casts
* Abstract base classes should have virtual destructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22057 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/DerivedTypes.h')
-rw-r--r-- | include/llvm/DerivedTypes.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/DerivedTypes.h b/include/llvm/DerivedTypes.h index a41bec8b1b..22807f1a6b 100644 --- a/include/llvm/DerivedTypes.h +++ b/include/llvm/DerivedTypes.h @@ -141,7 +141,7 @@ public: /// getNumParams - Return the number of fixed parameters this function type /// requires. This does not consider varargs. /// - unsigned getNumParams() const { return (unsigned)ContainedTys.size()-1; } + unsigned getNumParams() const { return unsigned(ContainedTys.size()-1); } // Implement the AbstractTypeUser interface. virtual void refineAbstractType(const DerivedType *OldTy, const Type *NewTy); @@ -207,7 +207,7 @@ public: element_iterator element_end() const { return ContainedTys.end(); } // Random access to the elements - unsigned getNumElements() const { return (unsigned)ContainedTys.size(); } + unsigned getNumElements() const { return unsigned(ContainedTys.size()); } const Type *getElementType(unsigned N) const { assert(N < ContainedTys.size() && "Element number out of range!"); return ContainedTys[N]; |