diff options
author | Chris Lattner <sabre@nondot.org> | 2001-07-21 19:02:43 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-07-21 19:02:43 +0000 |
commit | f98e88f7453df864a56bda6ca19cf70e09bf3e6e (patch) | |
tree | 9b1bf4e6699de69344fc78b93fd3bf6c06a47d96 | |
parent | e6b9529b4869e7a5379d68b0adb1ded91487e99e (diff) | |
download | external_llvm-f98e88f7453df864a56bda6ca19cf70e09bf3e6e.zip external_llvm-f98e88f7453df864a56bda6ca19cf70e09bf3e6e.tar.gz external_llvm-f98e88f7453df864a56bda6ca19cf70e09bf3e6e.tar.bz2 |
Moved isIntegral to the Type system
Renamed equals(char) to equalsInt(char). Made it a const memfunc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/ConstPoolVals.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/include/llvm/ConstPoolVals.h b/include/llvm/ConstPoolVals.h index c45c317..a9730c2 100644 --- a/include/llvm/ConstPoolVals.h +++ b/include/llvm/ConstPoolVals.h @@ -68,6 +68,7 @@ class ConstPoolBool : public ConstPoolVal { bool Val; ConstPoolBool(const ConstPoolBool &CP); public: + ConstPoolBool(const Type *Ty, bool V, const string &Name = ""); ConstPoolBool(bool V, const string &Name = ""); virtual string getStrValue() const; @@ -101,20 +102,15 @@ public: virtual bool equals(const ConstPoolVal *V) const; - // equals - Provide a helper method that can be used to determine if the + // equalsInt - Provide a helper method that can be used to determine if the // constant contained within is equal to a constant. This only works for very // small values, because this is all that can be represented with all types. // - bool equals(unsigned char V) { + bool equalsInt(unsigned char V) const { assert(V <= 127 && "equals: Can only be used with very small constants!"); return Val.Unsigned == V; } - // isIntegral - Equivalent to isSigned() || isUnsigned, but with only a single - // virtual function invocation. - // - virtual bool isIntegral() const { return 1; } - // ConstPoolInt::get static method: return a constant pool int with the // specified value. as above, we work only with very small values here. // |