aboutsummaryrefslogtreecommitdiff
path: root/lib/Basic/TargetInfo.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2011-08-04 01:21:14 +0000
committerChad Rosier <mcrosier@apple.com>2011-08-04 01:21:14 +0000
commit61a62216a0bb33fb668ab653d9f9a704e43d2fc6 (patch)
tree999fee0c071a7f8b6d95330248ea3595c03e0be1 /lib/Basic/TargetInfo.cpp
parenta5e19c6b2554f6d9c4b9850d4dbbbfa3643282e5 (diff)
Add partial support for using anonymous bitfields (e.g., int : 0) to enforce
alignment. This fixes cases where the anonymous bitfield is followed by a non-bitfield member. E.g., struct t4 { int foo : 1; long : 0; char bar; }; Part of rdar://9859156 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136858 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/TargetInfo.cpp')
-rw-r--r--lib/Basic/TargetInfo.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Basic/TargetInfo.cpp b/lib/Basic/TargetInfo.cpp
index 7ea51467c1..91b16d5778 100644
--- a/lib/Basic/TargetInfo.cpp
+++ b/lib/Basic/TargetInfo.cpp
@@ -53,6 +53,8 @@ TargetInfo::TargetInfo(const std::string &T) : Triple(T) {
Int64Type = SignedLongLong;
SigAtomicType = SignedInt;
UseBitFieldTypeAlignment = true;
+ UseZeroLengthBitfieldAlignment = false;
+ ZeroLengthBitfieldBoundary = 0;
FloatFormat = &llvm::APFloat::IEEEsingle;
DoubleFormat = &llvm::APFloat::IEEEdouble;
LongDoubleFormat = &llvm::APFloat::IEEEdouble;