[llvm-commits] [gcc-plugin] r82041 - /gcc-plugin/trunk/llvm-convert.cpp
Duncan Sands
baldrick at free.fr
Wed Sep 16 04:54:42 PDT 2009
Author: baldrick
Date: Wed Sep 16 06:54:42 2009
New Revision: 82041
URL: http://llvm.org/viewvc/llvm-project?rev=82041&view=rev
Log:
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. This problem occurred because the plugin now converts "bool" into i1 rather
than i8.
Modified:
gcc-plugin/trunk/llvm-convert.cpp
Modified: gcc-plugin/trunk/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/llvm-convert.cpp?rev=82041&r1=82040&r2=82041&view=diff
==============================================================================
--- gcc-plugin/trunk/llvm-convert.cpp (original)
+++ gcc-plugin/trunk/llvm-convert.cpp Wed Sep 16 06:54:42 2009
@@ -7419,9 +7419,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