[llvm-commits] CVS: llvm/include/llvm/DerivedTypes.h

Reid Spencer reid at x10sys.com
Wed Jan 17 19:00:14 PST 2007



Changes in directory llvm/include/llvm:

DerivedTypes.h updated: 1.79 -> 1.80
---
Log message:

Provide an isPowerOf2ByteWidth method for the IntegerType class. This will
mostly be used by back ends that wish to distinguish between integer types
that fit evenly within a natural integer type and those that don't.


---
Diffs of the changes:  (+6 -0)

 DerivedTypes.h |    6 ++++++
 1 files changed, 6 insertions(+)


Index: llvm/include/llvm/DerivedTypes.h
diff -u llvm/include/llvm/DerivedTypes.h:1.79 llvm/include/llvm/DerivedTypes.h:1.80
--- llvm/include/llvm/DerivedTypes.h:1.79	Fri Jan 12 16:11:53 2007
+++ llvm/include/llvm/DerivedTypes.h	Wed Jan 17 20:59:54 2007
@@ -101,6 +101,12 @@
   /// @brief Get the number of bits in this IntegerType
   unsigned getBitWidth() const { return getSubclassData(); }
 
+  /// This method determines if the width of this IntegerType is a power-of-2
+  /// in terms of 8 bit bytes. 
+  /// @returns true if this is a power-of-2 byte width.
+  /// @brief Is this a power-of-2 byte-width IntegerType ?
+  bool isPowerOf2ByteWidth() const;
+
   // Methods for support type inquiry through isa, cast, and dyn_cast:
   static inline bool classof(const IntegerType *T) { return true; }
   static inline bool classof(const Type *T) {






More information about the llvm-commits mailing list