[llvm-commits] [llvm-gcc-4.2] r83879 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Duncan Sands
baldrick at free.fr
Mon Oct 12 12:40:31 PDT 2009
Author: baldrick
Date: Mon Oct 12 14:40:30 2009
New Revision: 83879
URL: http://llvm.org/viewvc/llvm-project?rev=83879&view=rev
Log:
Port of dragonegg commit 82041: Remove an incorrect assertion. This fires
when adding (for example) an i1 field. Adding an i1 field does not mean
adding a bitfield, it means adding a byte of which only the first bit is used.
Since all the logic uses the AllocSize, which is 1 byte for an i1, as far as
I can see everything should work correctly in this case.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=83879&r1=83878&r2=83879&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Mon Oct 12 14:40:30 2009
@@ -7473,9 +7473,6 @@
///
void ConstantLayoutInfo::
AddFieldToRecordConstant(Constant *Val, uint64_t GCCFieldOffsetInBits) {
- assert((TD.getTypeSizeInBits(Val->getType()) & 7) == 0 &&
- "Cannot handle non-byte sized values");
-
// Figure out how to add this non-bitfield value to our constant struct so
// that it ends up at the right offset. There are four cases we have to
// think about:
More information about the llvm-commits
mailing list