]> granicus.if.org Git - clang/commit
Fix support for _Bool bitfields. The issue is that the bitfield width
authorEli Friedman <eli.friedman@gmail.com>
Sat, 17 May 2008 20:03:47 +0000 (20:03 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Sat, 17 May 2008 20:03:47 +0000 (20:03 +0000)
commit316bb1b9eb9dc3da60e930f50c9b7578411d4966
tree42ea2358ffb8a4546b5e7aa0e9b08f02113099df
parent489ecd59eff2602744cbd5089c48ad0d77963dfa
Fix support for _Bool bitfields. The issue is that the bitfield width
used for _Bool is not the same as the primitive width (which for _Bool
is 1 bit).  The load and store changes add some casts to make the
types consistent.  The EmitLValue changes make sure that the pointer is
of an appropriate type for loading the bitfield.

This isn't perfect, but it's an improvement, and getting everything
right depends on actually laying out structs in an ABI-compliant way.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51224 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGExpr.cpp
test/CodeGen/bool-bitfield.c [new file with mode: 0644]