[llvm-commits] [llvm-gcc-4.2] r113107 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

Duncan Sands baldrick at free.fr
Sun Sep 5 06:25:32 PDT 2010


Author: baldrick
Date: Sun Sep  5 08:25:32 2010
New Revision: 113107

URL: http://llvm.org/viewvc/llvm-project?rev=113107&view=rev
Log:
Commit 106612 (stuart) broke the Ada front-end build.  The
problem is that the Ada f-e likes to mark fields as bitfields
whether they are really bitfields or not.  In Ada a bitfield
can be of any type (including struct and array types), while
commit 106612 only works properly for bitfields of scalar type.
When building the Ada f-e, the only non-scalar bitfields are
actually bogus bitfields - i.e. those that don't need to be
handled as bitfields at all.  Thus the build can be fixed
by using the isBitfield predicate which only returns true for
non-bogus bitfields.

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=113107&r1=113106&r2=113107&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Sun Sep  5 08:25:32 2010
@@ -8480,7 +8480,7 @@
     // Zero-sized bitfields upset the type converter.  If it's not a
     // bit-field, or it is a bit-field but it has a non-zero precision
     // type, go ahead and convert it.
-    if (!DECL_BIT_FIELD_TYPE(Field) || TYPE_PRECISION(TREE_TYPE(Field)))
+    if (!isBitfield(Field) || TYPE_PRECISION(TREE_TYPE(Field)))
       Val = Convert(FieldValue);        // Decode the field's value.
 
     if (DECL_SIZE(Field)) {





More information about the llvm-commits mailing list