[llvm-branch-commits] [llvm-gcc-branch] r127274 - /llvm-gcc-4.2/branches/release_29/gcc/llvm-convert.cpp
Bill Wendling
isanbard at gmail.com
Tue Mar 8 13:43:32 PST 2011
Author: void
Date: Tue Mar 8 15:43:32 2011
New Revision: 127274
URL: http://llvm.org/viewvc/llvm-project?rev=127274&view=rev
Log:
--- Reverse-merging r126672 into '.':
U gcc/llvm-convert.cpp
This was breaking this testcase (<rdar://problem/9098656>):
$ cat testcase.i
typedef struct {
union {
struct { } __attribute((packed));
};
} foo;
const foo boo = {{{ 0, 0, 0, 0 }}};
Modified:
llvm-gcc-4.2/branches/release_29/gcc/llvm-convert.cpp
Modified: llvm-gcc-4.2/branches/release_29/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/release_29/gcc/llvm-convert.cpp?rev=127274&r1=127273&r2=127274&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/release_29/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/branches/release_29/gcc/llvm-convert.cpp Tue Mar 8 15:43:32 2011
@@ -8582,10 +8582,10 @@
// Convert the constant itself.
Constant *Val = Convert(VEC_index(constructor_elt, elt, 0)->value);
- // Unions are initialized using the first non-anonymous member field. Find it.
+ // Unions are initialized using the first member field. Find it.
tree Field = TYPE_FIELDS(TREE_TYPE(exp));
assert(Field && "cannot initialize union with no fields");
- while (TREE_CODE(Field) != FIELD_DECL || DECL_NAME(Field) == NULL_TREE) {
+ while (TREE_CODE(Field) != FIELD_DECL) {
Field = TREE_CHAIN(Field);
assert(Field && "cannot initialize union with no fields");
}
More information about the llvm-branch-commits
mailing list