[llvm-branch-commits] [llvm-gcc-branch] r109703 - in /llvm-gcc-4.2/branches/Apple/Morbo: ./ gcc/c-common.h gcc/c-decl.c gcc/c-parser.c gcc/cp/parser.c gcc/testsuite/g++.apple/blockstret.C gcc/testsuite/gcc.apple/blockstret.c

Bill Wendling isanbard at gmail.com
Wed Jul 28 16:56:28 PDT 2010


Author: void
Date: Wed Jul 28 18:56:27 2010
New Revision: 109703

URL: http://llvm.org/viewvc/llvm-project?rev=109703&view=rev
Log:
$ svn merge -c 109702 https://llvm.org/svn/llvm-project/llvm-gcc-4.2/trunk
--- Merging r109702 into '.':
A    gcc/testsuite/gcc.apple/blockstret.c
A    gcc/testsuite/g++.apple/blockstret.C
U    gcc/cp/parser.c
U    gcc/c-decl.c
U    gcc/c-common.h
U    gcc/c-parser.c


Added:
    llvm-gcc-4.2/branches/Apple/Morbo/gcc/testsuite/g++.apple/blockstret.C
      - copied unchanged from r109702, llvm-gcc-4.2/trunk/gcc/testsuite/g++.apple/blockstret.C
    llvm-gcc-4.2/branches/Apple/Morbo/gcc/testsuite/gcc.apple/blockstret.c
      - copied unchanged from r109702, llvm-gcc-4.2/trunk/gcc/testsuite/gcc.apple/blockstret.c
Modified:
    llvm-gcc-4.2/branches/Apple/Morbo/   (props changed)
    llvm-gcc-4.2/branches/Apple/Morbo/gcc/c-common.h
    llvm-gcc-4.2/branches/Apple/Morbo/gcc/c-decl.c
    llvm-gcc-4.2/branches/Apple/Morbo/gcc/c-parser.c
    llvm-gcc-4.2/branches/Apple/Morbo/gcc/cp/parser.c

Propchange: llvm-gcc-4.2/branches/Apple/Morbo/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul 28 18:56:27 2010
@@ -1,2 +1,2 @@
 /llvm/trunk:100565
-/llvm-gcc-4.2/trunk:98728,98841,98893,99196,99305,99592-99593,99629,99670,99982,99984-99986,99988,99992-99993,99995,99997-99999,100035,100149,100303,100565,100624-100626,100712,100721,101090-101091,101199,101216,101304,101333,101804,101959,102139,102148,102433,102444,102506-102507,102511,102532,102561,102589,102636,102648,102745,103361,103366-103367,103394,103414,103644,103800,103918,104181,104384,104420,104423,104523,104726,105504,105828-105829,105902,105948-105949,106005,106243-106244,106270,106352,106564,106611-106612,106681,106690,106711,107062,107843,108784-108786,109556-109557
+/llvm-gcc-4.2/trunk:98728,98841,98893,99196,99305,99592-99593,99629,99670,99982,99984-99986,99988,99992-99993,99995,99997-99999,100035,100149,100303,100565,100624-100626,100712,100721,101090-101091,101199,101216,101304,101333,101804,101959,102139,102148,102433,102444,102506-102507,102511,102532,102561,102589,102636,102648,102745,103361,103366-103367,103394,103414,103644,103800,103918,104181,104384,104420,104423,104523,104726,105504,105828-105829,105902,105948-105949,106005,106243-106244,106270,106352,106564,106611-106612,106681,106690,106711,107062,107439,107843,108784-108786,109556-109557,109702

Modified: llvm-gcc-4.2/branches/Apple/Morbo/gcc/c-common.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Morbo/gcc/c-common.h?rev=109703&r1=109702&r2=109703&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Morbo/gcc/c-common.h (original)
+++ llvm-gcc-4.2/branches/Apple/Morbo/gcc/c-common.h Wed Jul 28 18:56:27 2010
@@ -1157,7 +1157,9 @@
      /* APPLE LOCAL radar 5822844 */
      BLOCK_IS_GLOBAL = 	       (1 << 28),
      /* APPLE LOCAL radar 7735196 */
-     BLOCK_USE_STRET =    (1 << 29)
+     BLOCK_USE_STRET =    (1 << 29),
+     /* APPLE LOCAL radar 8143947 */
+     BLOCK_HAS_SIGNATURE  =    (1 << 30)
 };
 
 struct block_sema_info {

Modified: llvm-gcc-4.2/branches/Apple/Morbo/gcc/c-decl.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Morbo/gcc/c-decl.c?rev=109703&r1=109702&r2=109703&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Morbo/gcc/c-decl.c (original)
+++ llvm-gcc-4.2/branches/Apple/Morbo/gcc/c-decl.c Wed Jul 28 18:56:27 2010
@@ -8136,6 +8136,11 @@
  // optional helper functions
  void *CopyFuncPtr; // When BLOCK_HAS_COPY_DISPOSE is set (withCopyDispose true)
  void *DestroyFuncPtr; // When BLOCK_HAS_COPY_DISPOSE is set (withCopyDispose true)
+
+ // APPLE LOCAL begin radar 8143947
+ const char *signature;   // the block signature
+ const char *layout;      // reserved
+ // APPLE LOCAL end radar 8143947
 } *descriptor_ptr_type;
 
 Objects of this type will always be static. This is one main component of abi change.
@@ -8174,6 +8179,16 @@
     chainon (field_decl_chain, field_decl);
   }
   
+
+  /* APPLE LOCAL begin radar 8143947 */
+  /* char * signature */
+  field_decl = build_decl (FIELD_DECL, get_identifier ("signature"), build_pointer_type (char_type_node));
+  chainon (field_decl_chain, field_decl);
+  /* char * layout */
+  field_decl = build_decl (FIELD_DECL, get_identifier ("layout"), build_pointer_type (char_type_node));
+  chainon (field_decl_chain, field_decl);
+  /* APPLE LOCAL end radar 8143947 */
+
    /* Mark this struct as being a block struct rather than a 'normal'
       struct.  */
   TYPE_BLOCK_IMPL_STRUCT (main_type) = 1;

Modified: llvm-gcc-4.2/branches/Apple/Morbo/gcc/c-parser.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Morbo/gcc/c-parser.c?rev=109703&r1=109702&r2=109703&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Morbo/gcc/c-parser.c (original)
+++ llvm-gcc-4.2/branches/Apple/Morbo/gcc/c-parser.c Wed Jul 28 18:56:27 2010
@@ -9428,6 +9428,10 @@
         {
           unsigned long int reserved;
 	  unsigned long int Size;
+          // APPLE LOCAL begin radar 8143927
+          const char *signature;   // the block signature
+          const char *layout;      // reserved
+          // APPLE LOCAL end radar 8143927
 	} *__descriptor;
    };
 
@@ -9488,6 +9492,10 @@
     // optional helper functions
     void *CopyFuncPtr; // When BLOCK_HAS_COPY_DISPOSE
     void *DestroyFuncPtr; // When BLOCK_HAS_COPY_DISPOSE 
+    // APPLE LOCAL begin radar 8143927
+    const char *signature;   // the block signature
+    const char *layout;      // reserved
+    // APPLE LOCAL end radar 8143927
  } *__descriptor;
  
  // imported variables
@@ -9590,6 +9598,10 @@
   {0, sizeof(struct literal_block_n), 
    copy_helper_block_1, // only if block BLOCK_HAS_COPY_DISPOSE
    destroy_helper_block_1, // only if block BLOCK_HAS_COPY_DISPOSE
+   // APPLE LOCAL begin radar 8143947
+   // const char *signature;   // the block signature set to 0
+   // const char *layout;      // reserved set to 0
+   // APPLE LOCAL end radar 8143947 
   }
 */
 static tree
@@ -9638,6 +9650,19 @@
       helper_addr = convert (ptr_type_node, helper_addr);
       initlist = tree_cons (fields, helper_addr, initlist);
     }
+  /* APPLE LOCAL begin radar 8143947 */
+  /* signature field is set to 0 */
+  fields = TREE_CHAIN (fields);
+  initlist = tree_cons (fields,
+                        build_int_cst (build_pointer_type (char_type_node), 0),
+                        initlist);
+  /* layout field is set to 0 */
+  fields = TREE_CHAIN (fields);
+  initlist = tree_cons (fields,
+                        build_int_cst (build_pointer_type (char_type_node), 0),
+                        initlist);
+  /* APPLE LOCAL end radar 8143947 */
+  
   constructor = build_constructor_from_list (descriptor_type,
                                              nreverse (initlist));
   TREE_CONSTANT (constructor) = 1;
@@ -9658,6 +9683,7 @@
  build_block_struct_initlist - builds the initializer list:
  { &_NSConcreteStackBlock or &_NSConcreteGlobalBlock // __isa,
    BLOCK_USE_STRET | BLOCK_HAS_COPY_DISPOSE | BLOCK_IS_GLOBAL // __flags,
+   | BLOCK_HAS_SIGNATURE // __flags
    0, // __reserved
    &helper_1, // __FuncPtr,
    &static_descriptor_variable // __descriptor,
@@ -9673,7 +9699,7 @@
   tree initlist, helper_addr;
   tree chain, fields;
   /* APPLE LOCAL radar 7735196 */
-  unsigned int flags = 0;
+  unsigned int flags = BLOCK_HAS_SIGNATURE;
   static tree NSConcreteStackBlock_decl = NULL_TREE;
   static tree NSConcreteGlobalBlock_decl = NULL_TREE;
   tree descriptor_block_decl = build_descriptor_block_decl (block_struct_type, block_impl);
@@ -9819,6 +9845,10 @@
     // optional helper functions
     void *CopyFuncPtr; // When BLOCK_HAS_COPY_DISPOSE
     void *DestroyFuncPtr; // When BLOCK_HAS_COPY_DISPOSE
+    // APPLE LOCAL begin radar 8143927
+    const char *signature;   // the block signature
+    const char *layout;      // reserved
+    // APPLE LOCAL end radar 8143927
  } *__descriptor;
 
  // imported variables
@@ -9833,6 +9863,7 @@
  struct __block_literal_n I = {
    &_NSConcreteStackBlock or &_NSConcreteGlobalBlock // __isa,
    BLOCK_USE_STRET | BLOCK_HAS_COPY_DISPOSE | BLOCK_IS_GLOBAL // __flags,
+   | BLOCK_HAS_SIGNATURE // __flags
    0, // __reserved
    &helper_1, // __FuncPtr 
    &static_descriptor_variable // __descriptor,

Modified: llvm-gcc-4.2/branches/Apple/Morbo/gcc/cp/parser.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Morbo/gcc/cp/parser.c?rev=109703&r1=109702&r2=109703&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Morbo/gcc/cp/parser.c (original)
+++ llvm-gcc-4.2/branches/Apple/Morbo/gcc/cp/parser.c Wed Jul 28 18:56:27 2010
@@ -20599,6 +20599,10 @@
   {0, sizeof(struct literal_block_n), 
    copy_helper_block_1, // only if block BLOCK_HAS_COPY_DISPOSE
    destroy_helper_block_1, // only if block BLOCK_HAS_COPY_DISPOSE
+   // APPLE LOCAL begin radar 8143947
+   // const char *signature;   // the block signature set to 0
+   // const char *layout;      // reserved set to 0
+   // APPLE LOCAL end radar 8143947
   }
 */
 static tree
@@ -20641,6 +20645,15 @@
       helper_addr = convert (ptr_type_node, helper_addr);
       CONSTRUCTOR_APPEND_ELT(impl_v, NULL_TREE, helper_addr);
     }
+  /* APPLE LOCAL begin radar 8143947 */
+  /* signature field is set to 0 */
+  CONSTRUCTOR_APPEND_ELT(impl_v, NULL_TREE, 
+                         build_int_cst (build_pointer_type (char_type_node), 0));
+  /* layout field is set to 0 */
+  CONSTRUCTOR_APPEND_ELT(impl_v, NULL_TREE, 
+                         build_int_cst (build_pointer_type (char_type_node), 0));
+  /* APPLE LOCAL end radar 8143947 */
+
   /* Create a CONSTRUCTOR to represent the braced-initializer.  */
   constructor = make_node (CONSTRUCTOR);
   CONSTRUCTOR_ELTS (constructor) = impl_v;
@@ -20673,6 +20686,10 @@
         {
           unsigned long int reserved;
 	  unsigned long int Size;
+          // APPLE LOCAL begin radar 8143927
+          const char *signature;   // the block signature
+          const char *layout;      // reserved
+          // APPLE LOCAL end radar 8143927
 	} *__descriptor;
    };
 
@@ -20872,6 +20889,7 @@
  build_block_struct_initlist - builds the initializer list:
  { &_NSConcreteStackBlock or &_NSConcreteGlobalBlock // __isa,
    BLOCK_USE_STRET | BLOCK_HAS_COPY_DISPOSE | BLOCK_IS_GLOBAL // __flags,
+   | BLOCK_HAS_SIGNATURE // __flags
    0, // __reserved,
    &helper_1, // __FuncPtr,
    &static_descriptor_variable // __descriptor,
@@ -20889,7 +20907,7 @@
 {
   tree expr, chain, helper_addr;
   /* APPLE LOCAL radar 7735196 */
-  unsigned flags = 0;
+  unsigned flags = BLOCK_HAS_SIGNATURE;
   static tree NSConcreteStackBlock_decl = NULL_TREE;
   static tree NSConcreteGlobalBlock_decl = NULL_TREE;
   VEC(constructor_elt,gc) *impl_v = NULL;
@@ -21882,6 +21900,10 @@
  // optional helper functions
  void *CopyFuncPtr; // When BLOCK_HAS_COPY_DISPOSE is set (withCopyDispose true)
  void *DestroyFuncPtr; // When BLOCK_HAS_COPY_DISPOSE is set (withCopyDispose true)
+ // APPLE LOCAL begin radar 8143947
+ const char *signature;   // the block signature
+ const char *layout;      // reserved
+ // APPLE LOCAL end radar 8143947
 } *descriptor_ptr_type;
 
 Objects of this type will always be static. This is one main component of abi change.
@@ -21922,6 +21944,17 @@
     field_decl_chain = field_decl;
   }
 
+  /* APPLE LOCAL begin radar 8143947 */
+  /* char * signature */
+  field_decl = build_decl (FIELD_DECL, get_identifier ("signature"), build_pointer_type (char_type_node));
+  TREE_CHAIN (field_decl) = field_decl_chain;
+  field_decl_chain = field_decl;
+  /* char * layout */
+  field_decl = build_decl (FIELD_DECL, get_identifier ("layout"), build_pointer_type (char_type_node));
+  TREE_CHAIN (field_decl) = field_decl_chain;
+  field_decl_chain = field_decl;
+  /* APPLE LOCAL end radar 8143947 */
+
    /* Mark this struct as being a block struct rather than a 'normal'
       struct.  */
   TYPE_BLOCK_IMPL_STRUCT (main_type) = 1;





More information about the llvm-branch-commits mailing list