[llvm-commits] CVS: llvm/include/llvm/Target/TargetData.h
Reid Spencer
reid at x10sys.com
Wed Feb 14 18:11:25 PST 2007
Changes in directory llvm/include/llvm/Target:
TargetData.h updated: 1.54 -> 1.55
---
Log message:
Fixed packed structure breakage from earlier TargetData patch; applied
Chris Lattner's code style suggestions.
Patch by Scott Michel!
---
Diffs of the changes: (+4 -9)
TargetData.h | 13 ++++---------
1 files changed, 4 insertions(+), 9 deletions(-)
Index: llvm/include/llvm/Target/TargetData.h
diff -u llvm/include/llvm/Target/TargetData.h:1.54 llvm/include/llvm/Target/TargetData.h:1.55
--- llvm/include/llvm/Target/TargetData.h:1.54 Tue Feb 13 23:52:16 2007
+++ llvm/include/llvm/Target/TargetData.h Wed Feb 14 20:11:06 2007
@@ -48,7 +48,7 @@
/// @note The unusual order of elements in the structure attempts to reduce
/// padding and make the structure slightly more cache friendly.
struct TargetAlignElem {
- unsigned char AlignType; //< Alignment type (AlignTypeEnum)
+ 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
@@ -64,18 +64,12 @@
std::ostream &dump(std::ostream &os) const;
};
-//! TargetAlignElem output stream inserter
-/*!
- @sa TargetAlignElem::dump()
- */
-std::ostream &operator<<(std::ostream &os, const TargetAlignElem &elem);
-
class TargetData : public ImmutablePass {
private:
bool LittleEndian; ///< Defaults to false
unsigned char PointerMemSize; ///< Pointer size in bytes
unsigned char PointerABIAlign; ///< Pointer ABI alignment
- unsigned char PointerPrefAlign; ///< Pointer preferred global alignment
+ unsigned char PointerPrefAlign; ///< Pointer preferred alignment
//! Where the primitive type alignment data is stored.
/*!
@@ -99,7 +93,8 @@
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, short) const;
+ const TargetAlignElem &getAlignment(AlignTypeEnum align_type,
+ short bit_width) const;
//! Internal helper method that returns requested alignment for type.
unsigned char getAlignment(const Type *Ty, bool abi_or_pref) const;
More information about the llvm-commits
mailing list