Fix a typo in a comment.
[oota-llvm.git] / include / llvm / Target / TargetData.h
index 025d6aba4ba6008e4d1638362bef04885f060720..4e330e862dba7364d9d7e270d87d19677427faef 100644 (file)
@@ -51,13 +51,11 @@ struct TargetAlignElem {
   AlignTypeEnum       AlignType : 8;  //< Alignment type (AlignTypeEnum)
   unsigned char       ABIAlign;       //< ABI alignment for this type/bitw
   unsigned char       PrefAlign;      //< Pref. alignment for this type/bitw
-  short               TypeBitWidth;   //< Type bit width
+  uint32_t            TypeBitWidth;   //< Type bit width
 
   /// Initializer
   static TargetAlignElem get(AlignTypeEnum align_type, unsigned char abi_align,
-                             unsigned char pref_align, short bit_width);
-  /// Less-than predicate
-  bool operator<(const TargetAlignElem &rhs) const;
+                             unsigned char pref_align, uint32_t bit_width);
   /// Equality predicate
   bool operator==(const TargetAlignElem &rhs) const;
   /// output stream operator
@@ -91,10 +89,9 @@ private:
 
   //! Set/initialize target alignments
   void setAlignment(AlignTypeEnum align_type, unsigned char abi_align,
-                    unsigned char pref_align, short bit_width);
-  //! Get TargetAlignElem from alignment type and bit width
-  const TargetAlignElem &getAlignment(AlignTypeEnum align_type,
-                                      short bit_width) const;
+                    unsigned char pref_align, uint32_t bit_width);
+  unsigned getAlignmentInfo(AlignTypeEnum align_type, uint32_t bit_width,
+                            bool ABIAlign) const;
   //! Internal helper method that returns requested alignment for type.
   unsigned char getAlignment(const Type *Ty, bool abi_or_pref) const;
 
@@ -160,15 +157,15 @@ public:
   /// type.
   uint64_t getTypeSize(const Type *Ty) const;
 
-  /// getTypeSizeInBits - Return the number of bytes necessary to hold the
+  /// getTypeSizeInBits - Return the number of bits necessary to hold the
   /// specified type.
   uint64_t getTypeSizeInBits(const Type* Ty) const;
 
-  /// getTypeAlignmentABI - Return the minimum ABI-required alignment for the
+  /// getABITypeAlignment - Return the minimum ABI-required alignment for the
   /// specified type.
   unsigned char getABITypeAlignment(const Type *Ty) const;
 
-  /// getTypeAlignmentPref - Return the preferred stack/global alignment for
+  /// getPrefTypeAlignment - Return the preferred stack/global alignment for
   /// the specified type.
   unsigned char getPrefTypeAlignment(const Type *Ty) const;
 
@@ -182,7 +179,7 @@ public:
   ///
   const Type *getIntPtrType() const;
 
-  /// getIndexOffset - return the offset from the beginning of the type for the
+  /// getIndexedOffset - return the offset from the beginning of the type for the
   /// specified indices.  This is used to implement getelementptr.
   ///
   uint64_t getIndexedOffset(const Type *Ty,