diff options
| author | Reid Spencer <rspencer@reidspencer.com> | 2007-03-01 04:02:06 +0000 |
|---|---|---|
| committer | Reid Spencer <rspencer@reidspencer.com> | 2007-03-01 04:02:06 +0000 |
| commit | 5a642a799105a52131642ff309e0e26a6731f3ff (patch) | |
| tree | dee5a134b4621bb40eb8aeedae405ea78e0bc483 | |
| parent | d6450ba1dc05a28064df4397908e583e0e6e374d (diff) | |
| download | bcm5719-llvm-5a642a799105a52131642ff309e0e26a6731f3ff.tar.gz bcm5719-llvm-5a642a799105a52131642ff309e0e26a6731f3ff.zip | |
Reduce #includage by taking a method out of line.
llvm-svn: 34774
| -rw-r--r-- | llvm/include/llvm/DerivedTypes.h | 6 | ||||
| -rw-r--r-- | llvm/lib/VMCore/Type.cpp | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/llvm/include/llvm/DerivedTypes.h b/llvm/include/llvm/DerivedTypes.h index 13e127a612a..29d7ede8232 100644 --- a/llvm/include/llvm/DerivedTypes.h +++ b/llvm/include/llvm/DerivedTypes.h @@ -19,7 +19,6 @@ #define LLVM_DERIVED_TYPES_H #include "llvm/Type.h" -#include "llvm/ADT/APInt.h" namespace llvm { @@ -31,6 +30,7 @@ class StructValType; class PointerValType; class VectorValType; class IntegerValType; +class APInt; class DerivedType : public Type { friend class Type; @@ -112,9 +112,7 @@ public: /// For example, this is 0xFF for an 8 bit integer, 0xFFFF for i16, etc. /// @returns a bit mask with ones set for all the bits of this type. /// @brief Get a bit mask for this type. - APInt getMask() const { - return APInt::getAllOnesValue(getBitWidth()); - } + APInt getMask() const; /// This method determines if the width of this IntegerType is a power-of-2 /// in terms of 8 bit bytes. diff --git a/llvm/lib/VMCore/Type.cpp b/llvm/lib/VMCore/Type.cpp index be80b11039b..7042faf2bba 100644 --- a/llvm/lib/VMCore/Type.cpp +++ b/llvm/lib/VMCore/Type.cpp @@ -972,6 +972,10 @@ bool IntegerType::isPowerOf2ByteWidth() const { return (BitWidth > 7) && isPowerOf2_32(BitWidth); } +APInt IntegerType::getMask() const { + return APInt::getAllOnesValue(getBitWidth()); +} + // FunctionValType - Define a class to hold the key that goes into the TypeMap // namespace llvm { |

