[llvm-commits] [126246] If all struct bitfields are packed then struct is packed.
dpatel at apple.com
dpatel at apple.com
Tue Apr 17 14:59:38 PDT 2007
Revision: 126246
Author: dpatel
Date: 2007-04-17 14:59:37 -0700 (Tue, 17 Apr 2007)
Log Message:
-----------
If all struct bitfields are packed then struct is packed.
This fixes recent SingleSource 2003-05-21-BitFieldHandling.c regression.
Modified Paths:
--------------
apple-local/branches/llvm/gcc/llvm-types.cpp
Modified: apple-local/branches/llvm/gcc/llvm-types.cpp
===================================================================
--- apple-local/branches/llvm/gcc/llvm-types.cpp 2007-04-17 20:29:12 UTC (rev 126245)
+++ apple-local/branches/llvm/gcc/llvm-types.cpp 2007-04-17 21:59:37 UTC (rev 126246)
@@ -945,7 +945,7 @@
/// getLLVMType - Return the LLVM type for the specified object.
///
const Type *getLLVMType() const {
- return StructType::get(Elements, Packed);
+ return StructType::get(Elements, Packed || AllBitFields);
}
/// getSizeAsLLVMStruct - Return the size of this struct if it were converted
More information about the llvm-commits
mailing list