diff options
author | Anders Carlsson <andersca@mac.com> | 2009-07-23 17:24:40 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-07-23 17:24:40 +0000 |
commit | 4b5584b38b860e8ecb20420e2fe16d5ed97a68a0 (patch) | |
tree | 5f92e418b2ec562c94326da4cea78c72862f960f /lib/CodeGen/CGRecordLayoutBuilder.h | |
parent | 8330ceeebb3bfac31116b387b90ff2ce3cef85e4 (diff) |
We don't need to keep track of the packed alignment, just whether the struct is packed or not. Fixes PR4610.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76884 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGRecordLayoutBuilder.h')
-rw-r--r-- | lib/CodeGen/CGRecordLayoutBuilder.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/CodeGen/CGRecordLayoutBuilder.h b/lib/CodeGen/CGRecordLayoutBuilder.h index 2f212f86c0..197e4206d3 100644 --- a/lib/CodeGen/CGRecordLayoutBuilder.h +++ b/lib/CodeGen/CGRecordLayoutBuilder.h @@ -33,10 +33,8 @@ namespace CodeGen { class CGRecordLayoutBuilder { CodeGenTypes &Types; - /// StructPacking - Will be 0 if this struct is not packed. If it is packed, - /// it will have the packing alignment in bits. - /// - unsigned StructPacking; + /// Packed - Whether the resulting LLVM struct will be packed or not. + bool Packed; /// AlignmentAsLLVMStruct - Will contain the maximum alignment of all the /// LLVM types. @@ -79,7 +77,7 @@ class CGRecordLayoutBuilder { llvm::SmallVector<LLVMBitFieldInfo, 16> LLVMBitFields; CGRecordLayoutBuilder(CodeGenTypes &Types) - : Types(Types), StructPacking(0), AlignmentAsLLVMStruct(1) + : Types(Types), Packed(false), AlignmentAsLLVMStruct(1) , BitsAvailableInLastField(0) { } /// Layout - Will layout a RecordDecl. |