您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ DECL_IGNORED_P函数代码示例

51自学网 2021-06-01 20:20:25
  C++
这篇教程C++ DECL_IGNORED_P函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中DECL_IGNORED_P函数的典型用法代码示例。如果您正苦于以下问题:C++ DECL_IGNORED_P函数的具体用法?C++ DECL_IGNORED_P怎么用?C++ DECL_IGNORED_P使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了DECL_IGNORED_P函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: gimple_can_coalesce_p

boolgimple_can_coalesce_p (tree name1, tree name2){  /* First check the SSA_NAME's associated DECL.  We only want to     coalesce if they have the same DECL or both have no associated DECL.  */  tree var1 = SSA_NAME_VAR (name1);  tree var2 = SSA_NAME_VAR (name2);  var1 = (var1 && (!VAR_P (var1) || !DECL_IGNORED_P (var1))) ? var1 : NULL_TREE;  var2 = (var2 && (!VAR_P (var2) || !DECL_IGNORED_P (var2))) ? var2 : NULL_TREE;  if (var1 != var2)    return false;  /* Now check the types.  If the types are the same, then we should     try to coalesce V1 and V2.  */  tree t1 = TREE_TYPE (name1);  tree t2 = TREE_TYPE (name2);  if (t1 == t2)    return true;  /* If the types are not the same, check for a canonical type match.  This     (for example) allows coalescing when the types are fundamentally the     same, but just have different names.      Note pointer types with different address spaces may have the same     canonical type.  Those are rejected for coalescing by the     types_compatible_p check.  */  if (TYPE_CANONICAL (t1)      && TYPE_CANONICAL (t1) == TYPE_CANONICAL (t2)      && types_compatible_p (t1, t2))    return true;  return false;}
开发者ID:earonesty,项目名称:gcc,代码行数:33,


示例2: declare_function_name

voiddeclare_function_name (){  tree decl, init;  char *name, *printable_name;  if (current_function_decl == NULL)    {      name = "";      printable_name = "top level";    }  else    {      char *kind = "function";      if (TREE_CODE (TREE_TYPE (current_function_decl)) == METHOD_TYPE)	kind = "method";      /* Allow functions to be nameless (such as artificial ones).  */      if (DECL_NAME (current_function_decl))        name = IDENTIFIER_POINTER (DECL_NAME (current_function_decl));      else	name = "";      printable_name = (*decl_printable_name) (current_function_decl, &kind);    }  push_obstacks_nochange ();  decl = build_decl (VAR_DECL, get_identifier ("__FUNCTION__"),		     char_array_type_node);  TREE_STATIC (decl) = 1;  TREE_READONLY (decl) = 1;  DECL_SOURCE_LINE (decl) = 0;  DECL_IN_SYSTEM_HEADER (decl) = 1;  DECL_IGNORED_P (decl) = 1;  init = build_string (strlen (name) + 1, name);  TREE_TYPE (init) = char_array_type_node;  DECL_INITIAL (decl) = init;  finish_decl (pushdecl (decl), init, NULL_TREE);  push_obstacks_nochange ();  decl = build_decl (VAR_DECL, get_identifier ("__PRETTY_FUNCTION__"),		     char_array_type_node);  TREE_STATIC (decl) = 1;  TREE_READONLY (decl) = 1;  DECL_SOURCE_LINE (decl) = 0;  DECL_IN_SYSTEM_HEADER (decl) = 1;  DECL_IGNORED_P (decl) = 1;  init = build_string (strlen (printable_name) + 1, printable_name);  TREE_TYPE (init) = char_array_type_node;  DECL_INITIAL (decl) = init;  finish_decl (pushdecl (decl), init, NULL_TREE);}
开发者ID:Kiddinglife,项目名称:4.4BSD-Lite,代码行数:50,


示例3: target_for_debug_bind

treetarget_for_debug_bind (tree var){  if (!MAY_HAVE_DEBUG_STMTS)    return NULL_TREE;  if (TREE_CODE (var) == SSA_NAME)    {      var = SSA_NAME_VAR (var);      if (var == NULL_TREE)	return NULL_TREE;    }  if ((TREE_CODE (var) != VAR_DECL       || VAR_DECL_IS_VIRTUAL_OPERAND (var))      && TREE_CODE (var) != PARM_DECL)    return NULL_TREE;  if (DECL_HAS_VALUE_EXPR_P (var))    return target_for_debug_bind (DECL_VALUE_EXPR (var));  if (DECL_IGNORED_P (var))    return NULL_TREE;  /* var-tracking only tracks registers.  */  if (!is_gimple_reg_type (TREE_TYPE (var)))    return NULL_TREE;  return var;}
开发者ID:Caleb1994,项目名称:stewieos-gcc,代码行数:30,


示例4: sdbout_toplevel_data

static voidsdbout_toplevel_data (tree decl){  tree type = TREE_TYPE (decl);  if (DECL_IGNORED_P (decl))    return;  gcc_assert (TREE_CODE (decl) == VAR_DECL);  gcc_assert (MEM_P (DECL_RTL (decl)));  gcc_assert (DECL_INITIAL (decl));  PUT_SDB_DEF (IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)));  PUT_SDB_VAL (XEXP (DECL_RTL (decl), 0));  if (TREE_PUBLIC (decl))    {      PUT_SDB_SCL (C_EXT);    }  else    {      PUT_SDB_SCL (C_STAT);    }  PUT_SDB_TYPE (plain_type (type));  PUT_SDB_ENDEF;}
开发者ID:BoxianLai,项目名称:moxiedev,代码行数:25,


示例5: create_struct_var

static treecreate_struct_var (tree type, tree decl, location_t location){    char type_name[50];    tree tmp_var;    strcpy(type_name, "rz_");    strcat(type_name, get_name(decl));    tmp_var = build_decl (location,            VAR_DECL, get_identifier(type_name),            type);    /* The variable was declared by the compiler.  */    DECL_ARTIFICIAL (tmp_var) = 1;    /* And we don't want debug info for it.  */    DECL_IGNORED_P (tmp_var) = 1;    /* Make the variable writable.  */    TREE_READONLY (tmp_var) = 0;    DECL_EXTERNAL (tmp_var) = 0;    TREE_STATIC (tmp_var) = 0;    TREE_USED (tmp_var) = 1;		DECL_CONTEXT(tmp_var) = cfun->decl;    return tmp_var;}
开发者ID:sdzahed,项目名称:LBC-Plugin,代码行数:29,


示例6: getVolatile_builtin

static treegetVolatile_builtin (tree method_return_type ATTRIBUTE_UNUSED, 		     tree orig_call){  tree addr, stmt, modify_stmt, tmp;  UNMARSHAL3 (orig_call);  (void) this_arg; /* Avoid set but not used warning.  */  addr = build_addr_sum (method_return_type, obj_arg, offset_arg);  addr     = fold_convert (build_pointer_type (build_type_variant 					(method_return_type, 0, 1)), addr);    stmt = build_call_expr (builtin_decl_explicit (BUILT_IN_SYNC_SYNCHRONIZE), 0);  tmp = build_decl (BUILTINS_LOCATION, VAR_DECL, NULL, method_return_type);  DECL_IGNORED_P (tmp) = 1;  DECL_ARTIFICIAL (tmp) = 1;  pushdecl (tmp);  modify_stmt = fold_build2 (MODIFY_EXPR, method_return_type,			     tmp,			     build_java_indirect_ref (method_return_type, addr,						      flag_check_references));  stmt = build2 (COMPOUND_EXPR, void_type_node, modify_stmt, stmt);  stmt = build2 (COMPOUND_EXPR, method_return_type, stmt, tmp);    return stmt;}
开发者ID:Nodplus,项目名称:gcc,代码行数:29,


示例7: build_equiv_decl

static treebuild_equiv_decl (tree union_type, bool is_init){  tree decl;  char name[15];  static int serial = 0;  if (is_init)    {      decl = gfc_create_var (union_type, "equiv");      TREE_STATIC (decl) = 1;      return decl;    }  snprintf (name, sizeof (name), "equiv.%d", serial++);  decl = build_decl (VAR_DECL, get_identifier (name), union_type);  DECL_ARTIFICIAL (decl) = 1;  DECL_IGNORED_P (decl) = 1;  if (!gfc_can_put_var_on_stack (DECL_SIZE_UNIT (decl)))    TREE_STATIC (decl) = 1;  TREE_ADDRESSABLE (decl) = 1;  TREE_USED (decl) = 1;  /* The source location has been lost, and doesn't really matter.     We need to set it to something though.  */  gfc_set_decl_location (decl, &gfc_current_locus);  gfc_add_decl_to_function (decl);  return decl;}
开发者ID:aosm,项目名称:libstdcxx_SUPanWheat,代码行数:33,


示例8: create_cilk_helper_decl

static treecreate_cilk_helper_decl (struct wrapper_data *wd){  char name[20];  if (wd->type == CILK_BLOCK_FOR)    sprintf (name, "_cilk_for_" HOST_WIDE_INT_PRINT_DEC, cilk_wrapper_count++);  else if (wd->type == CILK_BLOCK_SPAWN)    sprintf (name, "_cilk_spn_" HOST_WIDE_INT_PRINT_DEC, cilk_wrapper_count++);  else    gcc_unreachable ();     clean_symbol_name (name);  tree fndecl = build_decl (DECL_SOURCE_LOCATION (current_function_decl),			    FUNCTION_DECL, get_identifier (name), wd->fntype);  TREE_PUBLIC (fndecl) = 0;  TREE_STATIC (fndecl) = 1;  TREE_USED (fndecl) = 1;  DECL_ARTIFICIAL (fndecl) = 0;  DECL_IGNORED_P (fndecl) = 0;  DECL_EXTERNAL (fndecl) = 0;  DECL_CONTEXT (fndecl) = wd->context;   tree block = make_node (BLOCK);  DECL_INITIAL (fndecl) = block;  TREE_USED (block) = 1;  BLOCK_SUPERCONTEXT (block) = fndecl;  gcc_assert (!DECL_SAVED_TREE (fndecl));  /* Inlining would defeat the purpose of this wrapper.     Either it secretly switches stack frames or it allocates     a stable stack frame to hold function arguments even if     the parent stack frame is stolen.  */  DECL_UNINLINABLE (fndecl) = 1;  tree result_decl = build_decl (UNKNOWN_LOCATION, RESULT_DECL, NULL_TREE, 				 void_type_node);  DECL_ARTIFICIAL (result_decl) = 0;  DECL_IGNORED_P (result_decl) = 1;  DECL_CONTEXT (result_decl) = fndecl;  DECL_RESULT (fndecl) = result_decl;    return fndecl;}
开发者ID:Distrotech,项目名称:gcc,代码行数:45,


示例9: copy_var_decl

treecopy_var_decl (tree var, tree name, tree type){  tree copy = build_decl (DECL_SOURCE_LOCATION (var), VAR_DECL, name, type);  TREE_ADDRESSABLE (copy) = TREE_ADDRESSABLE (var);  TREE_THIS_VOLATILE (copy) = TREE_THIS_VOLATILE (var);  DECL_GIMPLE_REG_P (copy) = DECL_GIMPLE_REG_P (var);  DECL_ARTIFICIAL (copy) = DECL_ARTIFICIAL (var);  DECL_IGNORED_P (copy) = DECL_IGNORED_P (var);  DECL_CONTEXT (copy) = DECL_CONTEXT (var);  TREE_NO_WARNING (copy) = TREE_NO_WARNING (var);  TREE_USED (copy) = 1;  DECL_SEEN_IN_BIND_EXPR_P (copy) = 1;  DECL_ATTRIBUTES (copy) = DECL_ATTRIBUTES (var);  return copy;}
开发者ID:earonesty,项目名称:gcc,代码行数:18,


示例10: mf_make_builtin

/* Helper for mudflap_init: construct a decl with the given category,   name, and type, mark it an external reference, and pushdecl it.  */static inline treemf_make_builtin (enum tree_code category, const char *name, tree type){  tree decl = mf_mark (build_decl (UNKNOWN_LOCATION,				   category, get_identifier (name), type));  TREE_PUBLIC (decl) = 1;  DECL_EXTERNAL (decl) = 1;  lang_hooks.decls.pushdecl (decl);  /* The decl was declared by the compiler.  */  DECL_ARTIFICIAL (decl) = 1;  /* And we don't want debug info for it.  */  DECL_IGNORED_P (decl) = 1;  return decl;}
开发者ID:ChaosJohn,项目名称:gcc,代码行数:16,


示例11: unpack_ts_decl_common_value_fields

static voidunpack_ts_decl_common_value_fields (struct bitpack_d *bp, tree expr){  DECL_MODE (expr) = bp_unpack_machine_mode (bp);  DECL_NONLOCAL (expr) = (unsigned) bp_unpack_value (bp, 1);  DECL_VIRTUAL_P (expr) = (unsigned) bp_unpack_value (bp, 1);  DECL_IGNORED_P (expr) = (unsigned) bp_unpack_value (bp, 1);  DECL_ABSTRACT_P (expr) = (unsigned) bp_unpack_value (bp, 1);  DECL_ARTIFICIAL (expr) = (unsigned) bp_unpack_value (bp, 1);  DECL_USER_ALIGN (expr) = (unsigned) bp_unpack_value (bp, 1);  DECL_PRESERVE_P (expr) = (unsigned) bp_unpack_value (bp, 1);  DECL_EXTERNAL (expr) = (unsigned) bp_unpack_value (bp, 1);  DECL_GIMPLE_REG_P (expr) = (unsigned) bp_unpack_value (bp, 1);  DECL_ALIGN (expr) = (unsigned) bp_unpack_var_len_unsigned (bp);#ifdef ACCEL_COMPILER  if (DECL_ALIGN (expr) > targetm.absolute_biggest_alignment)    DECL_ALIGN (expr) = targetm.absolute_biggest_alignment;#endif  if (TREE_CODE (expr) == LABEL_DECL)    {      EH_LANDING_PAD_NR (expr) = (int) bp_unpack_var_len_unsigned (bp);      /* Always assume an initial value of -1 for LABEL_DECL_UID to	 force gimple_set_bb to recreate label_to_block_map.  */      LABEL_DECL_UID (expr) = -1;    }  if (TREE_CODE (expr) == FIELD_DECL)    {      DECL_PACKED (expr) = (unsigned) bp_unpack_value (bp, 1);      DECL_NONADDRESSABLE_P (expr) = (unsigned) bp_unpack_value (bp, 1);      expr->decl_common.off_align = bp_unpack_value (bp, 8);    }  if (TREE_CODE (expr) == VAR_DECL)    {      DECL_HAS_DEBUG_EXPR_P (expr) = (unsigned) bp_unpack_value (bp, 1);      DECL_NONLOCAL_FRAME (expr) = (unsigned) bp_unpack_value (bp, 1);    }  if (TREE_CODE (expr) == RESULT_DECL      || TREE_CODE (expr) == PARM_DECL      || TREE_CODE (expr) == VAR_DECL)    {      DECL_BY_REFERENCE (expr) = (unsigned) bp_unpack_value (bp, 1);      if (TREE_CODE (expr) == VAR_DECL	  || TREE_CODE (expr) == PARM_DECL)	DECL_HAS_VALUE_EXPR_P (expr) = (unsigned) bp_unpack_value (bp, 1);    }}
开发者ID:pdziepak,项目名称:gcc,代码行数:50,


示例12: start_var_decl

treestart_var_decl (tree type, const char *name){  tree var = build_decl (input_location,			 VAR_DECL, get_identifier (name), type);  TREE_STATIC (var) = 1;  DECL_INITIAL (var) = error_mark_node;  /* A real initializer is coming... */  DECL_IGNORED_P (var) = 1;  DECL_ARTIFICIAL (var) = 1;  DECL_CONTEXT (var) = NULL_TREE;#ifdef OBJCPLUS  DECL_THIS_STATIC (var) = 1; /* squash redeclaration errors */#endif  return var;}
开发者ID:Nodplus,项目名称:gcc,代码行数:15,


示例13: build_exception_object_var

static treebuild_exception_object_var (void){  tree decl = DECL_FUNCTION_EXC_OBJ (current_function_decl);  if (decl == NULL)    {      decl = build_decl (DECL_SOURCE_LOCATION (current_function_decl),			 VAR_DECL, get_identifier ("#exc_obj"), ptr_type_node);      DECL_IGNORED_P (decl) = 1;      DECL_ARTIFICIAL (decl) = 1;      DECL_FUNCTION_EXC_OBJ (current_function_decl) = decl;      pushdecl_function_level (decl);    }  return decl;}
开发者ID:chinabin,项目名称:gcc-tiny,代码行数:16,


示例14: pack_ts_decl_common_value_fields

static voidpack_ts_decl_common_value_fields (struct bitpack_d *bp, tree expr){  bp_pack_enum (bp, machine_mode, MAX_MACHINE_MODE, DECL_MODE (expr));  bp_pack_value (bp, DECL_NONLOCAL (expr), 1);  bp_pack_value (bp, DECL_VIRTUAL_P (expr), 1);  bp_pack_value (bp, DECL_IGNORED_P (expr), 1);  bp_pack_value (bp, DECL_ABSTRACT (expr), 1);  bp_pack_value (bp, DECL_ARTIFICIAL (expr), 1);  bp_pack_value (bp, DECL_USER_ALIGN (expr), 1);  bp_pack_value (bp, DECL_PRESERVE_P (expr), 1);  bp_pack_value (bp, DECL_EXTERNAL (expr), 1);  bp_pack_value (bp, DECL_GIMPLE_REG_P (expr), 1);  bp_pack_var_len_unsigned (bp, DECL_ALIGN (expr));  if (TREE_CODE (expr) == LABEL_DECL)    {      /* Note that we do not write LABEL_DECL_UID.  The reader will	 always assume an initial value of -1 so that the	 label_to_block_map is recreated by gimple_set_bb.  */      bp_pack_value (bp, DECL_ERROR_ISSUED (expr), 1);      bp_pack_var_len_unsigned (bp, EH_LANDING_PAD_NR (expr));    }  if (TREE_CODE (expr) == FIELD_DECL)    {      bp_pack_value (bp, DECL_PACKED (expr), 1);      bp_pack_value (bp, DECL_NONADDRESSABLE_P (expr), 1);      bp_pack_value (bp, expr->decl_common.off_align, 8);    }  if (TREE_CODE (expr) == VAR_DECL)    {      bp_pack_value (bp, DECL_HAS_DEBUG_EXPR_P (expr), 1);      bp_pack_value (bp, DECL_NONLOCAL_FRAME (expr), 1);    }  if (TREE_CODE (expr) == RESULT_DECL      || TREE_CODE (expr) == PARM_DECL      || TREE_CODE (expr) == VAR_DECL)    {      bp_pack_value (bp, DECL_BY_REFERENCE (expr), 1);      if (TREE_CODE (expr) == VAR_DECL	  || TREE_CODE (expr) == PARM_DECL)	bp_pack_value (bp, DECL_HAS_VALUE_EXPR_P (expr), 1);    }}
开发者ID:delkon,项目名称:gcc,代码行数:47,


示例15: unpack_ts_decl_common_value_fields

static voidunpack_ts_decl_common_value_fields (struct bitpack_d *bp, tree expr){  DECL_MODE (expr) = bp_unpack_enum (bp, machine_mode, MAX_MACHINE_MODE);  DECL_NONLOCAL (expr) = (unsigned) bp_unpack_value (bp, 1);  DECL_VIRTUAL_P (expr) = (unsigned) bp_unpack_value (bp, 1);  DECL_IGNORED_P (expr) = (unsigned) bp_unpack_value (bp, 1);  DECL_ABSTRACT (expr) = (unsigned) bp_unpack_value (bp, 1);  DECL_ARTIFICIAL (expr) = (unsigned) bp_unpack_value (bp, 1);  DECL_USER_ALIGN (expr) = (unsigned) bp_unpack_value (bp, 1);  DECL_PRESERVE_P (expr) = (unsigned) bp_unpack_value (bp, 1);  DECL_DEBUG_EXPR_IS_FROM (expr) = (unsigned) bp_unpack_value (bp, 1);  DECL_EXTERNAL (expr) = (unsigned) bp_unpack_value (bp, 1);  DECL_GIMPLE_REG_P (expr) = (unsigned) bp_unpack_value (bp, 1);  DECL_ALIGN (expr) = (unsigned) bp_unpack_var_len_unsigned (bp);  if (TREE_CODE (expr) == LABEL_DECL)    {      DECL_ERROR_ISSUED (expr) = (unsigned) bp_unpack_value (bp, 1);      EH_LANDING_PAD_NR (expr) = (int) bp_unpack_var_len_unsigned (bp);      /* Always assume an initial value of -1 for LABEL_DECL_UID to	 force gimple_set_bb to recreate label_to_block_map.  */      LABEL_DECL_UID (expr) = -1;    }  if (TREE_CODE (expr) == FIELD_DECL)    {      DECL_PACKED (expr) = (unsigned) bp_unpack_value (bp, 1);      DECL_NONADDRESSABLE_P (expr) = (unsigned) bp_unpack_value (bp, 1);      expr->decl_common.off_align = bp_unpack_value (bp, 8);    }  if (TREE_CODE (expr) == VAR_DECL)    DECL_NONLOCAL_FRAME (expr) = (unsigned) bp_unpack_value (bp, 1);  if (TREE_CODE (expr) == RESULT_DECL      || TREE_CODE (expr) == PARM_DECL      || TREE_CODE (expr) == VAR_DECL)    {      DECL_BY_REFERENCE (expr) = (unsigned) bp_unpack_value (bp, 1);      if (TREE_CODE (expr) == VAR_DECL	  || TREE_CODE (expr) == PARM_DECL)	DECL_HAS_VALUE_EXPR_P (expr) = (unsigned) bp_unpack_value (bp, 1);    }}
开发者ID:MaddTheSane,项目名称:haiku-buildtools,代码行数:46,


示例16: compile_resource_data

voidcompile_resource_data (const char *name, const char *buffer, int length){  tree rtype, field = NULL_TREE, data_type, rinit, data, decl;  char buf[60];  data_type = build_prim_array_type (unsigned_byte_type_node,				     strlen (name) + length);  rtype = make_node (RECORD_TYPE);  PUSH_FIELD (rtype, field, "name_length", unsigned_int_type_node);  PUSH_FIELD (rtype, field, "resource_length", unsigned_int_type_node);  PUSH_FIELD (rtype, field, "data", data_type);  FINISH_RECORD (rtype);  START_RECORD_CONSTRUCTOR (rinit, rtype);  PUSH_FIELD_VALUE (rinit, "name_length", 		    build_int_cst (NULL_TREE, strlen (name)));  PUSH_FIELD_VALUE (rinit, "resource_length", 		    build_int_cst (NULL_TREE, length));  data = build_string (strlen(name) + length, buffer);  TREE_TYPE (data) = data_type;  PUSH_FIELD_VALUE (rinit, "data", data);  FINISH_RECORD_CONSTRUCTOR (rinit);  TREE_CONSTANT (rinit) = 1;  TREE_INVARIANT (rinit) = 1;  /* Generate a unique-enough identifier.  */  sprintf (buf, "_Jr%d", ++Jr_count);  decl = build_decl (VAR_DECL, get_identifier (buf), rtype);  TREE_STATIC (decl) = 1;  DECL_ARTIFICIAL (decl) = 1;  DECL_IGNORED_P (decl) = 1;  TREE_READONLY (decl) = 1;  TREE_THIS_VOLATILE (decl) = 0;  DECL_INITIAL (decl) = rinit;  layout_decl (decl, 0);  pushdecl (decl);  rest_of_decl_compilation (decl, global_bindings_p (), 0);  make_decl_rtl (decl);  assemble_variable (decl, 1, 0, 0);  resources = tree_cons (NULL_TREE, decl, resources);}
开发者ID:BackupTheBerlios,项目名称:iphone-binutils-svn,代码行数:43,


示例17: compile_resource_data

voidcompile_resource_data (const char *name, const char *buffer, int length){  tree rtype, field = NULL_TREE, data_type, rinit, data, decl;  VEC(constructor_elt,gc) *v = NULL;  data_type = build_prim_array_type (unsigned_byte_type_node,				     strlen (name) + length);  rtype = make_node (RECORD_TYPE);  PUSH_FIELD (input_location,	      rtype, field, "name_length", unsigned_int_type_node);  PUSH_FIELD (input_location,	      rtype, field, "resource_length", unsigned_int_type_node);  PUSH_FIELD (input_location, rtype, field, "data", data_type);  FINISH_RECORD (rtype);  START_RECORD_CONSTRUCTOR (v, rtype);  PUSH_FIELD_VALUE (v, "name_length", 		    build_int_cst (NULL_TREE, strlen (name)));  PUSH_FIELD_VALUE (v, "resource_length", 		    build_int_cst (NULL_TREE, length));  data = build_string (strlen(name) + length, buffer);  TREE_TYPE (data) = data_type;  PUSH_FIELD_VALUE (v, "data", data);  FINISH_RECORD_CONSTRUCTOR (rinit, v, rtype);  TREE_CONSTANT (rinit) = 1;  decl = build_decl (input_location,		     VAR_DECL, java_mangle_resource_name (name), rtype);  TREE_STATIC (decl) = 1;  TREE_PUBLIC (decl) = 1;  java_hide_decl (decl);  DECL_ARTIFICIAL (decl) = 1;  DECL_IGNORED_P (decl) = 1;  TREE_READONLY (decl) = 1;  TREE_THIS_VOLATILE (decl) = 0;  DECL_INITIAL (decl) = rinit;  layout_decl (decl, 0);  pushdecl (decl);  rest_of_decl_compilation (decl, global_bindings_p (), 0);  varpool_finalize_decl (decl);  VEC_safe_push (tree, gc, resources, decl);}
开发者ID:BoxianLai,项目名称:moxiedev,代码行数:43,


示例18: build_trivial_generic_function

static treebuild_trivial_generic_function (){  auto_vec <tree> param_types;  tree fndecl = make_fndecl (integer_type_node,			     "test_fn",			     param_types);  ASSERT_TRUE (fndecl != NULL);  /* Populate the function.  */  tree retval = build_decl (UNKNOWN_LOCATION, RESULT_DECL,			    NULL_TREE, integer_type_node);  DECL_ARTIFICIAL (retval) = 1;  DECL_IGNORED_P (retval) = 1;  DECL_RESULT (fndecl) = retval;  /* Create a BIND_EXPR, and within it, a statement list.  */  tree stmt_list = alloc_stmt_list ();  tree_stmt_iterator stmt_iter = tsi_start (stmt_list);  tree block = make_node (BLOCK);  tree bind_expr    = build3 (BIND_EXPR, void_type_node, NULL, stmt_list, block);  tree modify_retval = build2 (MODIFY_EXPR,			       integer_type_node,			       retval,			       build_int_cst (integer_type_node, 42));  tree return_stmt = build1 (RETURN_EXPR,			     integer_type_node,			     modify_retval);  tsi_link_after (&stmt_iter, return_stmt, TSI_CONTINUE_LINKING);  DECL_INITIAL (fndecl) = block;  /* how to add to function? the following appears to be how to     set the body of a fndecl: */  DECL_SAVED_TREE(fndecl) = bind_expr;  /* Ensure that locals appear in the debuginfo.  */  BLOCK_VARS (block) = BIND_EXPR_VARS (bind_expr);  return fndecl;}
开发者ID:duarten,项目名称:gcc,代码行数:43,


示例19: create_tmp_var_raw

treecreate_tmp_var_raw (tree type, const char *prefix){  tree tmp_var;  tmp_var = build_decl (input_location,			VAR_DECL, prefix ? create_tmp_var_name (prefix) : NULL,			type);  /* The variable was declared by the compiler.  */  DECL_ARTIFICIAL (tmp_var) = 1;  /* And we don't want debug info for it.  */  DECL_IGNORED_P (tmp_var) = 1;  /* Make the variable writable.  */  TREE_READONLY (tmp_var) = 0;  DECL_EXTERNAL (tmp_var) = 0;  TREE_STATIC (tmp_var) = 0;  TREE_USED (tmp_var) = 1;  return tmp_var;}
开发者ID:WojciechMigda,项目名称:gcc,代码行数:23,


示例20: create_vop_var

static voidcreate_vop_var (struct function *fn){  tree global_var;  gcc_assert (fn->gimple_df->vop == NULL_TREE);  global_var = build_decl (BUILTINS_LOCATION, VAR_DECL,			   get_identifier (".MEM"),			   void_type_node);  DECL_ARTIFICIAL (global_var) = 1;  DECL_IGNORED_P (global_var) = 1;  TREE_READONLY (global_var) = 0;  DECL_EXTERNAL (global_var) = 1;  TREE_STATIC (global_var) = 1;  TREE_USED (global_var) = 1;  DECL_CONTEXT (global_var) = NULL_TREE;  TREE_THIS_VOLATILE (global_var) = 0;  TREE_ADDRESSABLE (global_var) = 0;  VAR_DECL_IS_VIRTUAL_OPERAND (global_var) = 1;  fn->gimple_df->vop = global_var;}
开发者ID:gmarkall,项目名称:gcc,代码行数:23,


示例21: rename_ssa_copies

static unsigned intrename_ssa_copies (void){  var_map map;  basic_block bb;  gimple_stmt_iterator gsi;  tree var, part_var;  gimple stmt, phi;  unsigned x;  FILE *debug;  bool updated = false;  memset (&stats, 0, sizeof (stats));  if (dump_file && (dump_flags & TDF_DETAILS))    debug = dump_file;  else    debug = NULL;  map = init_var_map (num_ssa_names);  FOR_EACH_BB (bb)    {      /* Scan for real copies.  */      for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))	{	  stmt = gsi_stmt (gsi);	  if (gimple_assign_ssa_name_copy_p (stmt))	    {	      tree lhs = gimple_assign_lhs (stmt);	      tree rhs = gimple_assign_rhs1 (stmt);	      updated |= copy_rename_partition_coalesce (map, lhs, rhs, debug);	    }	}    }  FOR_EACH_BB (bb)    {      /* Treat PHI nodes as copies between the result and each argument.  */      for (gsi = gsi_start_phis (bb); !gsi_end_p (gsi); gsi_next (&gsi))        {          size_t i;	  tree res;	  phi = gsi_stmt (gsi);	  res = gimple_phi_result (phi);	  /* Do not process virtual SSA_NAMES.  */	  if (virtual_operand_p (res))	    continue;	  /* Make sure to only use the same partition for an argument	     as the result but never the other way around.  */	  if (SSA_NAME_VAR (res)	      && !DECL_IGNORED_P (SSA_NAME_VAR (res)))	    for (i = 0; i < gimple_phi_num_args (phi); i++)	      {		tree arg = PHI_ARG_DEF (phi, i);		if (TREE_CODE (arg) == SSA_NAME)		  updated |= copy_rename_partition_coalesce (map, res, arg,							     debug);	      }	  /* Else if all arguments are in the same partition try to merge	     it with the result.  */	  else	    {	      int all_p_same = -1;	      int p = -1;	      for (i = 0; i < gimple_phi_num_args (phi); i++)		{		  tree arg = PHI_ARG_DEF (phi, i);		  if (TREE_CODE (arg) != SSA_NAME)		    {		      all_p_same = 0;		      break;		    }		  else if (all_p_same == -1)		    {		      p = partition_find (map->var_partition,					  SSA_NAME_VERSION (arg));		      all_p_same = 1;		    }		  else if (all_p_same == 1			   && p != partition_find (map->var_partition,						   SSA_NAME_VERSION (arg)))		    {		      all_p_same = 0;		      break;		    }		}	      if (all_p_same == 1)		updated |= copy_rename_partition_coalesce (map, res,							   PHI_ARG_DEF (phi, 0),							   debug);	    }        }    }  if (debug)//.........这里部分代码省略.........
开发者ID:Lao16,项目名称:gcc,代码行数:101,


示例22: copy_rename_partition_coalesce

static boolcopy_rename_partition_coalesce (var_map map, tree var1, tree var2, FILE *debug){  int p1, p2, p3;  tree root1, root2;  tree rep1, rep2;  bool ign1, ign2, abnorm;  gcc_assert (TREE_CODE (var1) == SSA_NAME);  gcc_assert (TREE_CODE (var2) == SSA_NAME);  register_ssa_partition (map, var1);  register_ssa_partition (map, var2);  p1 = partition_find (map->var_partition, SSA_NAME_VERSION (var1));  p2 = partition_find (map->var_partition, SSA_NAME_VERSION (var2));  if (debug)    {      fprintf (debug, "Try : ");      print_generic_expr (debug, var1, TDF_SLIM);      fprintf (debug, "(P%d) & ", p1);      print_generic_expr (debug, var2, TDF_SLIM);      fprintf (debug, "(P%d)", p2);    }  gcc_assert (p1 != NO_PARTITION);  gcc_assert (p2 != NO_PARTITION);  if (p1 == p2)    {      if (debug)	fprintf (debug, " : Already coalesced./n");      return false;    }  rep1 = partition_to_var (map, p1);  rep2 = partition_to_var (map, p2);  root1 = SSA_NAME_VAR (rep1);  root2 = SSA_NAME_VAR (rep2);  if (!root1 && !root2)    return false;  /* Don't coalesce if one of the variables occurs in an abnormal PHI.  */  abnorm = (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (rep1)	    || SSA_NAME_OCCURS_IN_ABNORMAL_PHI (rep2));  if (abnorm)    {      if (debug)	fprintf (debug, " : Abnormal PHI barrier.  No coalesce./n");      return false;    }  /* Partitions already have the same root, simply merge them.  */  if (root1 == root2)    {      p1 = partition_union (map->var_partition, p1, p2);      if (debug)	fprintf (debug, " : Same root, coalesced --> P%d./n", p1);      return false;    }  /* Never attempt to coalesce 2 different parameters.  */  if ((root1 && TREE_CODE (root1) == PARM_DECL)      && (root2 && TREE_CODE (root2) == PARM_DECL))    {      if (debug)        fprintf (debug, " : 2 different PARM_DECLS. No coalesce./n");      return false;    }  if ((root1 && TREE_CODE (root1) == RESULT_DECL)      != (root2 && TREE_CODE (root2) == RESULT_DECL))    {      if (debug)        fprintf (debug, " : One root a RESULT_DECL. No coalesce./n");      return false;    }  ign1 = !root1 || (TREE_CODE (root1) == VAR_DECL && DECL_IGNORED_P (root1));  ign2 = !root2 || (TREE_CODE (root2) == VAR_DECL && DECL_IGNORED_P (root2));  /* Refrain from coalescing user variables, if requested.  */  if (!ign1 && !ign2)    {      if (flag_ssa_coalesce_vars && DECL_FROM_INLINE (root2))	ign2 = true;      else if (flag_ssa_coalesce_vars && DECL_FROM_INLINE (root1))	ign1 = true;      else if (flag_ssa_coalesce_vars != 2)	{	  if (debug)	    fprintf (debug, " : 2 different USER vars. No coalesce./n");	  return false;	}      else	ign2 = true;    }  /* If both values have default defs, we can't coalesce.  If only one has a//.........这里部分代码省略.........
开发者ID:Lao16,项目名称:gcc,代码行数:101,


示例23: print_node

//.........这里部分代码省略.........        fputs (code == CALL_EXPR ? " must-tail-call" : " static", file);    if (TREE_DEPRECATED (node))        fputs (" deprecated", file);    if (TREE_VISITED (node))        fputs (" visited", file);    if (code != TREE_VEC && code != INTEGER_CST && code != SSA_NAME)    {        if (TREE_LANG_FLAG_0 (node))            fputs (" tree_0", file);        if (TREE_LANG_FLAG_1 (node))            fputs (" tree_1", file);        if (TREE_LANG_FLAG_2 (node))            fputs (" tree_2", file);        if (TREE_LANG_FLAG_3 (node))            fputs (" tree_3", file);        if (TREE_LANG_FLAG_4 (node))            fputs (" tree_4", file);        if (TREE_LANG_FLAG_5 (node))            fputs (" tree_5", file);        if (TREE_LANG_FLAG_6 (node))            fputs (" tree_6", file);    }    /* DECL_ nodes have additional attributes.  */    switch (TREE_CODE_CLASS (code))    {    case tcc_declaration:        if (CODE_CONTAINS_STRUCT (code, TS_DECL_COMMON))        {            if (DECL_UNSIGNED (node))                fputs (" unsigned", file);            if (DECL_IGNORED_P (node))                fputs (" ignored", file);            if (DECL_ABSTRACT_P (node))                fputs (" abstract", file);            if (DECL_EXTERNAL (node))                fputs (" external", file);            if (DECL_NONLOCAL (node))                fputs (" nonlocal", file);        }        if (CODE_CONTAINS_STRUCT (code, TS_DECL_WITH_VIS))        {            if (DECL_WEAK (node))                fputs (" weak", file);            if (DECL_IN_SYSTEM_HEADER (node))                fputs (" in_system_header", file);        }        if (CODE_CONTAINS_STRUCT (code, TS_DECL_WRTL)                && code != LABEL_DECL                && code != FUNCTION_DECL                && DECL_REGISTER (node))            fputs (" regdecl", file);        if (code == TYPE_DECL && TYPE_DECL_SUPPRESS_DEBUG (node))            fputs (" suppress-debug", file);        if (code == FUNCTION_DECL                && DECL_FUNCTION_SPECIFIC_TARGET (node))            fputs (" function-specific-target", file);        if (code == FUNCTION_DECL                && DECL_FUNCTION_SPECIFIC_OPTIMIZATION (node))            fputs (" function-specific-opt", file);        if (code == FUNCTION_DECL && DECL_DECLARED_INLINE_P (node))            fputs (" autoinline", file);
开发者ID:RajibTheKing,项目名称:gcc,代码行数:67,


示例24: declare_function_name

voiddeclare_function_name (){  tree decl, type, init;  char *name, *printable_name;  int len;  if (current_function_decl == NULL)    {      name = "";      printable_name = "top level";    }  else    {      char *kind = "function";      if (TREE_CODE (TREE_TYPE (current_function_decl)) == METHOD_TYPE)	kind = "method";      /* Allow functions to be nameless (such as artificial ones).  */      if (DECL_NAME (current_function_decl))        name = IDENTIFIER_POINTER (DECL_NAME (current_function_decl));      else	name = "";      printable_name = (*decl_printable_name) (current_function_decl, &kind);    }  /* If the default size of char arrays isn't big enough for the name,     make a bigger one.  */  len = strlen (name) + 1;  type = char_array_type_node;  if (TREE_INT_CST_LOW (TYPE_MAX_VALUE (TREE_TYPE (char_array_type_node)))      < len)    type = build_array_type (char_type_node,			     build_index_type (build_int_2 (len, 0)));  push_obstacks_nochange ();  decl = build_decl (VAR_DECL, get_identifier ("__FUNCTION__"), type);  TREE_STATIC (decl) = 1;  TREE_READONLY (decl) = 1;  DECL_SOURCE_LINE (decl) = 0;  DECL_IN_SYSTEM_HEADER (decl) = 1;  DECL_IGNORED_P (decl) = 1;  init = build_string (len, name);  TREE_TYPE (init) = type;  DECL_INITIAL (decl) = init;  finish_decl (pushdecl (decl), init, NULL_TREE);  len = strlen (printable_name) + 1;  type = char_array_type_node;  if (TREE_INT_CST_LOW (TYPE_MAX_VALUE (TREE_TYPE (char_array_type_node)))      < len)    type = build_array_type (char_type_node,			     build_index_type (build_int_2 (len, 0)));  push_obstacks_nochange ();  decl = build_decl (VAR_DECL, get_identifier ("__PRETTY_FUNCTION__"), type);  TREE_STATIC (decl) = 1;  TREE_READONLY (decl) = 1;  DECL_SOURCE_LINE (decl) = 0;  DECL_IN_SYSTEM_HEADER (decl) = 1;  DECL_IGNORED_P (decl) = 1;  init = build_string (len, printable_name);  TREE_TYPE (init) = type;  DECL_INITIAL (decl) = init;  finish_decl (pushdecl (decl), init, NULL_TREE);}
开发者ID:wacke,项目名称:g21k,代码行数:65,


示例25: pop_binding

static treepop_binding (void){  tree res;  struct binding_level *cur;  cur = cur_binding_level;  res = cur->bind;  if (cur->save_stack)    {      tree tmp_var;      tree save;      tree save_call;      tree restore;      tree t;      /* Create an artificial var to save the stack pointer.  */      tmp_var = build_decl (input_location, VAR_DECL, NULL, ptr_type_node);      DECL_ARTIFICIAL (tmp_var) = true;      DECL_IGNORED_P (tmp_var) = true;      TREE_USED (tmp_var) = true;      pushdecl (tmp_var);      /* Create the save stmt.  */      save_call = build_call_expr	(builtin_decl_implicit (BUILT_IN_STACK_SAVE), 0);      save = build2 (MODIFY_EXPR, ptr_type_node, tmp_var, save_call);      TREE_SIDE_EFFECTS (save) = true;      /* Create the restore stmt.  */      restore = build_call_expr	(builtin_decl_implicit (BUILT_IN_STACK_RESTORE), 1, tmp_var);      /* Build a try-finally block.	 The statement list is the block of current statements.  */      t = build2 (TRY_FINALLY_EXPR, void_type_node, cur_stmts, NULL_TREE);      TREE_SIDE_EFFECTS (t) = true;      /* The finally block is the restore stmt.  */      append_to_statement_list (restore, &TREE_OPERAND (t, 1));      /* The body of the BIND_BLOCK is the save stmt, followed by the	 try block.  */      BIND_EXPR_BODY (res) = NULL_TREE;      append_to_statement_list (save, &BIND_EXPR_BODY (res));      append_to_statement_list (t, &BIND_EXPR_BODY (res));    }  else    {      /* The body of the BIND_BLOCK is the statement block.  */      BIND_EXPR_BODY (res) = cur_stmts;    }  BIND_EXPR_VARS (res) = cur->first_decl;  BLOCK_SUBBLOCKS (cur->block) = cur->first_block;  BLOCK_VARS (cur->block) = cur->first_decl;  /* Set current statements list and current binding.  */  cur_stmts = cur->prev_stmts;  cur_binding_level = cur->prev;  /* Put removed binding to the recycle list.  */  cur->prev = old_binding_levels;  old_binding_levels = cur;  return res;}
开发者ID:Jonsba,项目名称:ghdl,代码行数:68,


示例26: prepare_eh_table_type

treeprepare_eh_table_type (tree type){  tree exp;  tree *slot;  const char *name;  char *buf;  tree decl;  tree utf8_ref;  /* The "type" (match_info) in a (Java) exception table is a pointer to:   * a) NULL - meaning match any type in a try-finally.   * b) a pointer to a pointer to a class.   * c) a pointer to a pointer to a utf8_ref.  The pointer is   * rewritten to point to the appropriate class.  */  if (type == NULL_TREE)    return NULL_TREE;  if (TYPE_TO_RUNTIME_MAP (output_class) == NULL)    TYPE_TO_RUNTIME_MAP (output_class) = java_treetreehash_create (10);    slot = java_treetreehash_new (TYPE_TO_RUNTIME_MAP (output_class), type);  if (*slot != NULL)    return TREE_VALUE (*slot);  if (is_compiled_class (type) && !flag_indirect_dispatch)    {      name = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type)));      buf = (char *) alloca (strlen (name) + 5);      sprintf (buf, "%s_ref", name);      decl = build_decl (input_location,			 VAR_DECL, get_identifier (buf), ptr_type_node);      TREE_STATIC (decl) = 1;      DECL_ARTIFICIAL (decl) = 1;      DECL_IGNORED_P (decl) = 1;      TREE_READONLY (decl) = 1;      TREE_THIS_VOLATILE (decl) = 0;      DECL_INITIAL (decl) = build_class_ref (type);      layout_decl (decl, 0);      pushdecl (decl);      exp = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (decl)), decl);    }  else    {      utf8_ref = build_utf8_ref (DECL_NAME (TYPE_NAME (type)));      name = IDENTIFIER_POINTER (DECL_NAME (TREE_OPERAND (utf8_ref, 0)));      buf = (char *) alloca (strlen (name) + 5);      sprintf (buf, "%s_ref", name);      decl = build_decl (input_location,			 VAR_DECL, get_identifier (buf), utf8const_ptr_type);      TREE_STATIC (decl) = 1;      DECL_ARTIFICIAL (decl) = 1;      DECL_IGNORED_P (decl) = 1;      TREE_READONLY (decl) = 1;      TREE_THIS_VOLATILE (decl) = 0;      layout_decl (decl, 0);      pushdecl (decl);      exp = build1 (ADDR_EXPR, build_pointer_type (utf8const_ptr_type), decl);      CONSTRUCTOR_APPEND_ELT (TYPE_CATCH_CLASSES (output_class),			      NULL_TREE,			      make_catch_class_record (exp, utf8_ref));    }  exp = convert (ptr_type_node, exp);  *slot = tree_cons (type, exp, NULL_TREE);  return exp;}
开发者ID:chinabin,项目名称:gcc-tiny,代码行数:70,


示例27: build_common_decl

static treebuild_common_decl (gfc_common_head *com, tree union_type, bool is_init){  gfc_symbol *common_sym;  tree decl;  /* Create a namespace to store symbols for common blocks.  */  if (gfc_common_ns == NULL)    gfc_common_ns = gfc_get_namespace (NULL, 0);  gfc_get_symbol (com->name, gfc_common_ns, &common_sym);  decl = common_sym->backend_decl;  /* Update the size of this common block as needed.  */  if (decl != NULL_TREE)    {      tree size = TYPE_SIZE_UNIT (union_type);      /* Named common blocks of the same name shall be of the same size	 in all scoping units of a program in which they appear, but	 blank common blocks may be of different sizes.  */      if (!tree_int_cst_equal (DECL_SIZE_UNIT (decl), size)	  && strcmp (com->name, BLANK_COMMON_NAME))	gfc_warning ("Named COMMON block '%s' at %L shall be of the "		     "same size as elsewhere (%lu vs %lu bytes)", com->name,		     &com->where,		     (unsigned long) TREE_INT_CST_LOW (size),		     (unsigned long) TREE_INT_CST_LOW (DECL_SIZE_UNIT (decl)));      if (tree_int_cst_lt (DECL_SIZE_UNIT (decl), size))	{	  DECL_SIZE (decl) = TYPE_SIZE (union_type);	  DECL_SIZE_UNIT (decl) = size;	  DECL_MODE (decl) = TYPE_MODE (union_type);	  TREE_TYPE (decl) = union_type;	  layout_decl (decl, 0);	}     }  /* If this common block has been declared in a previous program unit,     and either it is already initialized or there is no new initialization     for it, just return.  */  if ((decl != NULL_TREE) && (!is_init || DECL_INITIAL (decl)))    return decl;  /* If there is no backend_decl for the common block, build it.  */  if (decl == NULL_TREE)    {      decl = build_decl (input_location,			 VAR_DECL, get_identifier (com->name), union_type);      gfc_set_decl_assembler_name (decl, gfc_sym_mangled_common_id (com));      TREE_PUBLIC (decl) = 1;      TREE_STATIC (decl) = 1;      DECL_IGNORED_P (decl) = 1;      if (!com->is_bind_c)	DECL_ALIGN (decl) = BIGGEST_ALIGNMENT;      else        {	  /* Do not set the alignment for bind(c) common blocks to	     BIGGEST_ALIGNMENT because that won't match what C does.  Also,	     for common blocks with one element, the alignment must be	     that of the field within the common block in order to match	     what C will do.  */	  tree field = NULL_TREE;	  field = TYPE_FIELDS (TREE_TYPE (decl));	  if (DECL_CHAIN (field) == NULL_TREE)	    DECL_ALIGN (decl) = TYPE_ALIGN (TREE_TYPE (field));	}      DECL_USER_ALIGN (decl) = 0;      GFC_DECL_COMMON_OR_EQUIV (decl) = 1;      gfc_set_decl_location (decl, &com->where);      if (com->threadprivate)	DECL_TLS_MODEL (decl) = decl_default_tls_model (decl);      /* Place the back end declaration for this common block in         GLOBAL_BINDING_LEVEL.  */      common_sym->backend_decl = pushdecl_top_level (decl);    }  /* Has no initial values.  */  if (!is_init)    {      DECL_INITIAL (decl) = NULL_TREE;      DECL_COMMON (decl) = 1;      DECL_DEFER_OUTPUT (decl) = 1;    }  else    {      DECL_INITIAL (decl) = error_mark_node;      DECL_COMMON (decl) = 0;      DECL_DEFER_OUTPUT (decl) = 0;    }  return decl;}
开发者ID:BoxianLai,项目名称:moxiedev,代码行数:96,


示例28: create_common

//.........这里部分代码省略.........      /* Has SAVE attribute.  */      if (s->sym->attr.save)        is_saved = true;    }  finish_record_layout (rli, true);  if (com)    decl = build_common_decl (com, union_type, is_init);  else    decl = build_equiv_decl (union_type, is_init, is_saved);  if (is_init)    {      tree ctor, tmp;      VEC(constructor_elt,gc) *v = NULL;      if (field != NULL_TREE && field_init != NULL_TREE)	CONSTRUCTOR_APPEND_ELT (v, field, field_init);      else	for (s = head; s; s = s->next)	  {	    if (s->sym->value)	      {		/* Add the initializer for this field.  */		tmp = gfc_conv_initializer (s->sym->value, &s->sym->ts,					    TREE_TYPE (s->field),					    s->sym->attr.dimension,					    s->sym->attr.pointer					    || s->sym->attr.allocatable, false);		CONSTRUCTOR_APPEND_ELT (v, s->field, tmp);	      }	  }      gcc_assert (!VEC_empty (constructor_elt, v));      ctor = build_constructor (union_type, v);      TREE_CONSTANT (ctor) = 1;      TREE_STATIC (ctor) = 1;      DECL_INITIAL (decl) = ctor;#ifdef ENABLE_CHECKING      {	tree field, value;	unsigned HOST_WIDE_INT idx;	FOR_EACH_CONSTRUCTOR_ELT (CONSTRUCTOR_ELTS (ctor), idx, field, value)	  gcc_assert (TREE_CODE (field) == FIELD_DECL);      }#endif    }  /* Build component reference for each variable.  */  for (s = head; s; s = next_s)    {      tree var_decl;      var_decl = build_decl (s->sym->declared_at.lb->location,			     VAR_DECL, DECL_NAME (s->field),			     TREE_TYPE (s->field));      TREE_STATIC (var_decl) = TREE_STATIC (decl);      /* Mark the variable as used in order to avoid warnings about	 unused variables.  */      TREE_USED (var_decl) = 1;      if (s->sym->attr.use_assoc)	DECL_IGNORED_P (var_decl) = 1;      if (s->sym->attr.target)	TREE_ADDRESSABLE (var_decl) = 1;      /* Fake variables are not visible from other translation units. */      TREE_PUBLIC (var_decl) = 0;      /* To preserve identifier names in COMMON, chain to procedure         scope unless at top level in a module definition.  */      if (com          && s->sym->ns->proc_name          && s->sym->ns->proc_name->attr.flavor == FL_MODULE)	var_decl = pushdecl_top_level (var_decl);      else	gfc_add_decl_to_function (var_decl);      SET_DECL_VALUE_EXPR (var_decl,			   fold_build3_loc (input_location, COMPONENT_REF,					    TREE_TYPE (s->field),					    decl, s->field, NULL_TREE));      DECL_HAS_VALUE_EXPR_P (var_decl) = 1;      GFC_DECL_COMMON_OR_EQUIV (var_decl) = 1;      if (s->sym->attr.assign)	{	  gfc_allocate_lang_decl (var_decl);	  GFC_DECL_ASSIGN (var_decl) = 1;	  GFC_DECL_STRING_LEN (var_decl) = GFC_DECL_STRING_LEN (s->field);	  GFC_DECL_ASSIGN_ADDR (var_decl) = GFC_DECL_ASSIGN_ADDR (s->field);	}      s->sym->backend_decl = var_decl;      next_s = s->next;      free (s);    }}
开发者ID:BoxianLai,项目名称:moxiedev,代码行数:101,


示例29: pop_binding

static treepop_binding (void){  tree res;  struct binding_level *cur;  cur = cur_binding_level;  res = cur->bind;  if (cur->save_stack)    {      tree tmp_var;      tree save;      tree save_call;      tree restore;      tree t;      /* Create an artificial var to save the stack pointer.  */      /* build_decl got a new parameter       * http://www.mail-archive.com/[email
C++ DECL_INITIAL函数代码示例
C++ DECL_HAS_VALUE_EXPR_P函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。