[llvm-branch-commits] [llvm-gcc-branch] r85304 - /llvm-gcc-4.2/branches/Apple/Leela/gcc/llvm-convert.cpp

Bill Wendling isanbard at gmail.com
Tue Oct 27 14:00:03 PDT 2009


Author: void
Date: Tue Oct 27 16:00:03 2009
New Revision: 85304

URL: http://llvm.org/viewvc/llvm-project?rev=85304&view=rev
Log:
$ svn merge -c 85303 https://llvm.org/svn/llvm-project/llvm-gcc-4.2/trunk
--- Merging r85303 into '.':
U    gcc/llvm-convert.cpp


Modified:
    llvm-gcc-4.2/branches/Apple/Leela/gcc/llvm-convert.cpp

Modified: llvm-gcc-4.2/branches/Apple/Leela/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Leela/gcc/llvm-convert.cpp?rev=85304&r1=85303&r2=85304&view=diff

==============================================================================
--- llvm-gcc-4.2/branches/Apple/Leela/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/branches/Apple/Leela/gcc/llvm-convert.cpp Tue Oct 27 16:00:03 2009
@@ -7789,10 +7789,12 @@
     uint64_t GCCFieldOffsetInBits = getFieldOffsetInBits(Field);
     NextField = TREE_CHAIN(Field);
 
-    uint64_t FieldSizeInBits = getInt64(DECL_SIZE(Field), true);
+    uint64_t FieldSizeInBits;
+    if (DECL_SIZE(Field))
+      FieldSizeInBits = getInt64(DECL_SIZE(Field), true);
     uint64_t ValueSizeInBits = Val->getType()->getPrimitiveSizeInBits();
     ConstantInt *ValC = dyn_cast<ConstantInt>(Val);
-    if (ValC && ValC->isZero()) {
+    if (ValC && ValC->isZero() && DECL_SIZE(Field)) {
       // G++ has various bugs handling {} initializers where it doesn't
       // synthesize a zero node of the right type.  Instead of figuring out G++,
       // just hack around it by special casing zero and allowing it to be the





More information about the llvm-branch-commits mailing list