[llvm-branch-commits] [llvm-gcc-branch] r110046 - /llvm-gcc-4.2/branches/Apple/Pertwee/gcc/objc/objc-act.c

Stuart Hastings stuart at apple.com
Mon Aug 2 10:58:53 PDT 2010


Author: stuart
Date: Mon Aug  2 12:58:53 2010
New Revision: 110046

URL: http://llvm.org/viewvc/llvm-project?rev=110046&view=rev
Log:
Issue error instead of ICE.  Radar 8246180.

Modified:
    llvm-gcc-4.2/branches/Apple/Pertwee/gcc/objc/objc-act.c

Modified: llvm-gcc-4.2/branches/Apple/Pertwee/gcc/objc/objc-act.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Pertwee/gcc/objc/objc-act.c?rev=110046&r1=110045&r2=110046&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Pertwee/gcc/objc/objc-act.c (original)
+++ llvm-gcc-4.2/branches/Apple/Pertwee/gcc/objc/objc-act.c Mon Aug  2 12:58:53 2010
@@ -2003,7 +2003,17 @@
 objc_build_compound_setter_call (tree receiver, tree prop_ident, tree rhs)
 {
   tree temp, bind, comma_exp;
-  if (TREE_SIDE_EFFECTS (rhs))
+  /* LLVM LOCAL begin 8246180 */
+#ifdef OBJCPLUS
+  if (TYPE_NEEDS_CONSTRUCTING (TREE_TYPE(rhs)))
+    error("setting a C++ non-POD object value is not implemented - assign the value to a temporary and use the temporary.");
+#endif
+  if (TREE_SIDE_EFFECTS (rhs)
+#ifdef OBJCPLUS
+      || TYPE_NEEDS_CONSTRUCTING (TREE_TYPE(rhs))
+#endif
+  /* LLVM LOCAL end 8246180 */
+      )
     {
       /* To allow for correct property assignment semantics
          and in accordance with C99 rules we generate: type temp;
@@ -2021,10 +2031,7 @@
       {
 	tree type = TREE_TYPE (rhs);
 	if (TYPE_NEEDS_CONSTRUCTING (type))
-          {
-	    comma_exp = temp;
-	    error("setting a C++ non-POD object value is not implemented - assign the value to a temporary and use the temporary.");
-	  }
+          comma_exp = temp;
 	else
       	  comma_exp = build_modify_expr (temp, NOP_EXPR, rhs);
       }





More information about the llvm-branch-commits mailing list