diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-05-27 18:42:17 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-05-27 18:42:17 +0000 |
commit | 6f739145b94ede1ca98b5a5e0e179c817c405d7b (patch) | |
tree | 20b15fe9effe41df1717cde0285dcaf622c12eb6 /lib/Sema/SemaAttr.cpp | |
parent | 638e7cf3a09436dce7f3150ff8e4f27d190bd2ed (diff) |
Parse/Sema: Add support for '#pragma options align=packed', which, it should be
noted, is not the same as __attribute__((packed)). That would be ridiculous!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104865 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaAttr.cpp')
-rw-r--r-- | lib/Sema/SemaAttr.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Sema/SemaAttr.cpp b/lib/Sema/SemaAttr.cpp index c540af2498..fcf5bfd669 100644 --- a/lib/Sema/SemaAttr.cpp +++ b/lib/Sema/SemaAttr.cpp @@ -146,6 +146,13 @@ void Sema::ActOnPragmaOptionsAlign(PragmaOptionsAlignKind Kind, Context->setAlignment(0); break; + // Note that '#pragma options align=packed' is not equivalent to attribute + // packed, it has a different precedence relative to attribute aligned. + case POAK_Packed: + Context->push(0); + Context->setAlignment(1); + break; + case POAK_Mac68k: // Check if the target supports this. if (!PP.getTargetInfo().hasAlignMac68kSupport()) { |