Reduce #includage by taking a method out of line.
authorReid Spencer <rspencer@reidspencer.com>
Thu, 1 Mar 2007 04:02:06 +0000 (04:02 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Thu, 1 Mar 2007 04:02:06 +0000 (04:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34774 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/DerivedTypes.h
lib/VMCore/Type.cpp

index 13e127a612ab591a060ee7d95217c4172494aaf1..29d7ede8232ac3e8d6564211dc4bbeba5b816586 100644 (file)
@@ -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. 
index be80b11039bce30f129bda34d1c12c43c5f3d831..7042faf2bba898b447e0e8d4e29152cc77d19efd 100644 (file)
@@ -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 {