diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-04-15 06:18:39 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-04-15 06:18:39 +0000 |
commit | b6a169395c1b30c76daffebcbd2164b6247a5d21 (patch) | |
tree | 0756d72a23bfde0c9f9a2a4f151c6d2d25c7c3c4 /lib/Basic/TargetInfo.cpp | |
parent | 3f87fb08dd502309960646db01099fb4c1be9a7c (diff) |
Add TargetInfo::useBitfieldTypeAlignment().
- Used to determine whether the alignment of the type in a bit-field is
respected when laying out structures. The default is true, targets can
override this as needed.
- This is designed to correspond to the PCC_BITFIELD_TYPE_MATTERS macro in
gcc. The AST/Sema implementation only affects one line, unless I have
forgotten something. I'd appreciate further review.
- IRgen still needs to be updated to fully support this (which is effectively
PR5591).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101356 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/TargetInfo.cpp')
-rw-r--r-- | lib/Basic/TargetInfo.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Basic/TargetInfo.cpp b/lib/Basic/TargetInfo.cpp index 136089fe90..8b4fdee47c 100644 --- a/lib/Basic/TargetInfo.cpp +++ b/lib/Basic/TargetInfo.cpp @@ -20,9 +20,8 @@ using namespace clang; // TargetInfo Constructor. TargetInfo::TargetInfo(const std::string &T) : Triple(T) { - // Set defaults. Defaults are set for a 32-bit RISC platform, - // like PPC or SPARC. - // These should be overridden by concrete targets as needed. + // Set defaults. Defaults are set for a 32-bit RISC platform, like PPC or + // SPARC. These should be overridden by concrete targets as needed. TLSSupported = true; PointerWidth = PointerAlign = 32; IntWidth = IntAlign = 32; @@ -45,6 +44,7 @@ TargetInfo::TargetInfo(const std::string &T) : Triple(T) { Char32Type = UnsignedInt; Int64Type = SignedLongLong; SigAtomicType = SignedInt; + UseBitfieldTypeAlignment = true; FloatFormat = &llvm::APFloat::IEEEsingle; DoubleFormat = &llvm::APFloat::IEEEdouble; LongDoubleFormat = &llvm::APFloat::IEEEdouble; |