summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-04-15 06:18:39 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-04-15 06:18:39 +0000
commit3d9289c736f503d156666ad82c91b9c1df91da7e (patch)
tree7bfa640d79606daccb395c3d3e679adc2d398153 /clang/lib/Basic
parent3245afdf05234f72721d95fd0cde097255d6814f (diff)
downloadbcm5719-llvm-3d9289c736f503d156666ad82c91b9c1df91da7e.tar.gz
bcm5719-llvm-3d9289c736f503d156666ad82c91b9c1df91da7e.zip
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). llvm-svn: 101356
Diffstat (limited to 'clang/lib/Basic')
-rw-r--r--clang/lib/Basic/TargetInfo.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Basic/TargetInfo.cpp b/clang/lib/Basic/TargetInfo.cpp
index 136089fe90c..8b4fdee47c2 100644
--- a/clang/lib/Basic/TargetInfo.cpp
+++ b/clang/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;
OpenPOWER on IntegriCloud