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

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

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

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

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

示例1: fixup_same_cpp_alias_visibility

voidfixup_same_cpp_alias_visibility (symtab_node node, symtab_node target){  if (is_a <cgraph_node> (node))    {      DECL_DECLARED_INLINE_P (node->symbol.decl)	 = DECL_DECLARED_INLINE_P (target->symbol.decl);      DECL_DISREGARD_INLINE_LIMITS (node->symbol.decl)	 = DECL_DISREGARD_INLINE_LIMITS (target->symbol.decl);    }  /* FIXME: It is not really clear why those flags should not be copied for     functions, too.  */  else    {      DECL_WEAK (node->symbol.decl) = DECL_WEAK (target->symbol.decl);      DECL_EXTERNAL (node->symbol.decl) = DECL_EXTERNAL (target->symbol.decl);      DECL_VISIBILITY (node->symbol.decl) = DECL_VISIBILITY (target->symbol.decl);    }  DECL_VIRTUAL_P (node->symbol.decl) = DECL_VIRTUAL_P (target->symbol.decl);  if (TREE_PUBLIC (node->symbol.decl))    {      DECL_EXTERNAL (node->symbol.decl) = DECL_EXTERNAL (target->symbol.decl);      DECL_COMDAT (node->symbol.decl) = DECL_COMDAT (target->symbol.decl);      DECL_COMDAT_GROUP (node->symbol.decl)	 = DECL_COMDAT_GROUP (target->symbol.decl);      if (DECL_ONE_ONLY (target->symbol.decl)	  && !node->symbol.same_comdat_group)	symtab_add_to_same_comdat_group ((symtab_node)node, (symtab_node)target);    }  node->symbol.externally_visible = target->symbol.externally_visible;}
开发者ID:Roffi,项目名称:gcc,代码行数:31,


示例2: DECL_DECLARED_INLINE_P

voidsymtab_node::fixup_same_cpp_alias_visibility (symtab_node *target){  if (is_a <cgraph_node *> (this))    {      DECL_DECLARED_INLINE_P (decl)	 = DECL_DECLARED_INLINE_P (target->decl);      DECL_DISREGARD_INLINE_LIMITS (decl)	 = DECL_DISREGARD_INLINE_LIMITS (target->decl);    }  /* FIXME: It is not really clear why those flags should not be copied for     functions, too.  */  else    {      DECL_WEAK (decl) = DECL_WEAK (target->decl);      DECL_EXTERNAL (decl) = DECL_EXTERNAL (target->decl);      DECL_VISIBILITY (decl) = DECL_VISIBILITY (target->decl);    }  DECL_VIRTUAL_P (decl) = DECL_VIRTUAL_P (target->decl);  if (TREE_PUBLIC (decl))    {      tree group;      DECL_EXTERNAL (decl) = DECL_EXTERNAL (target->decl);      DECL_COMDAT (decl) = DECL_COMDAT (target->decl);      group = target->get_comdat_group ();      set_comdat_group (group);      if (group && !same_comdat_group)	add_to_same_comdat_group (target);    }  externally_visible = target->externally_visible;}
开发者ID:lv88h,项目名称:gcc,代码行数:32,


示例3: decide_is_function_needed

static booldecide_is_function_needed (struct cgraph_node *node, tree decl){  if (MAIN_NAME_P (DECL_NAME (decl))      && TREE_PUBLIC (decl))    {      node->local.externally_visible = true;      return true;    }  /* If the user told us it is used, then it must be so.  */  if (node->local.externally_visible)    return true;  /* ??? If the assembler name is set by hand, it is possible to assemble     the name later after finalizing the function and the fact is noticed     in assemble_name then.  This is arguably a bug.  */  if (DECL_ASSEMBLER_NAME_SET_P (decl)      && TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)))    return true;  /* With -fkeep-inline-functions we are keeping all inline functions except     for extern inline ones.  */  if (flag_keep_inline_functions      && DECL_DECLARED_INLINE_P (decl)      && !DECL_EXTERNAL (decl)      && !lookup_attribute ("always_inline", DECL_ATTRIBUTES (decl)))     return true;  /* If we decided it was needed before, but at the time we didn't have     the body of the function available, then it's still needed.  We have     to go back and re-check its dependencies now.  */  if (node->needed)    return true;  /* Externally visible functions must be output.  The exception is     COMDAT functions that must be output only when they are needed.     When not optimizing, also output the static functions. (see     PR24561), but don't do so for always_inline functions, functions     declared inline and nested functions.  These was optimized out     in the original implementation and it is unclear whether we want     to change the behavior here.  */  if (((TREE_PUBLIC (decl)	|| (!optimize && !node->local.disregard_inline_limits	    && !DECL_DECLARED_INLINE_P (decl)	    && !node->origin))      && !flag_whole_program)      && !DECL_COMDAT (decl) && !DECL_EXTERNAL (decl))    return true;  /* Constructors and destructors are reachable from the runtime by     some mechanism.  */  if (DECL_STATIC_CONSTRUCTOR (decl) || DECL_STATIC_DESTRUCTOR (decl))    return true;  return false;}
开发者ID:BGmot,项目名称:playbook-dev-tools,代码行数:58,


示例4: pack_ts_function_decl_value_fields

static voidpack_ts_function_decl_value_fields (struct bitpack_d *bp, tree expr){  /* For normal/md builtins we only write the class and code, so they     should never be handled here.  */  gcc_assert (!streamer_handle_as_builtin_p (expr));  bp_pack_enum (bp, built_in_class, BUILT_IN_LAST,		DECL_BUILT_IN_CLASS (expr));  bp_pack_value (bp, DECL_STATIC_CONSTRUCTOR (expr), 1);  bp_pack_value (bp, DECL_STATIC_DESTRUCTOR (expr), 1);  bp_pack_value (bp, DECL_UNINLINABLE (expr), 1);  bp_pack_value (bp, DECL_POSSIBLY_INLINED (expr), 1);  bp_pack_value (bp, DECL_IS_NOVOPS (expr), 1);  bp_pack_value (bp, DECL_IS_RETURNS_TWICE (expr), 1);  bp_pack_value (bp, DECL_IS_MALLOC (expr), 1);  bp_pack_value (bp, DECL_IS_OPERATOR_NEW (expr), 1);  bp_pack_value (bp, DECL_DECLARED_INLINE_P (expr), 1);  bp_pack_value (bp, DECL_STATIC_CHAIN (expr), 1);  bp_pack_value (bp, DECL_NO_INLINE_WARNING_P (expr), 1);  bp_pack_value (bp, DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT (expr), 1);  bp_pack_value (bp, DECL_NO_LIMIT_STACK (expr), 1);  bp_pack_value (bp, DECL_DISREGARD_INLINE_LIMITS (expr), 1);  bp_pack_value (bp, DECL_PURE_P (expr), 1);  bp_pack_value (bp, DECL_LOOPING_CONST_OR_PURE_P (expr), 1);  if (DECL_BUILT_IN_CLASS (expr) != NOT_BUILT_IN)    bp_pack_value (bp, DECL_FUNCTION_CODE (expr), 11);  if (DECL_STATIC_DESTRUCTOR (expr))    bp_pack_var_len_unsigned (bp, DECL_FINI_PRIORITY (expr));}
开发者ID:Samsara00,项目名称:DragonFlyBSD,代码行数:30,


示例5: make_alias_for

treemake_alias_for (tree function, tree newid){    tree alias = build_decl (FUNCTION_DECL, newid, TREE_TYPE (function));    DECL_LANG_SPECIFIC (alias) = DECL_LANG_SPECIFIC (function);    cxx_dup_lang_specific_decl (alias);    DECL_CONTEXT (alias) = NULL;    TREE_READONLY (alias) = TREE_READONLY (function);    TREE_THIS_VOLATILE (alias) = TREE_THIS_VOLATILE (function);    TREE_PUBLIC (alias) = 0;    DECL_INTERFACE_KNOWN (alias) = 1;    DECL_NOT_REALLY_EXTERN (alias) = 1;    DECL_THIS_STATIC (alias) = 1;    DECL_SAVED_FUNCTION_DATA (alias) = NULL;    DECL_DESTRUCTOR_P (alias) = 0;    DECL_CONSTRUCTOR_P (alias) = 0;    DECL_CLONED_FUNCTION (alias) = NULL_TREE;    DECL_EXTERNAL (alias) = 0;    DECL_ARTIFICIAL (alias) = 1;    DECL_NO_STATIC_CHAIN (alias) = 1;    DECL_PENDING_INLINE_P (alias) = 0;    DECL_INLINE (alias) = 0;    DECL_DECLARED_INLINE_P (alias) = 0;    DECL_DEFERRED_FN (alias) = 0;    DECL_USE_TEMPLATE (alias) = 0;    DECL_TEMPLATE_INSTANTIATED (alias) = 0;    DECL_TEMPLATE_INFO (alias) = NULL;    DECL_INITIAL (alias) = error_mark_node;    TREE_ADDRESSABLE (alias) = 1;    TREE_USED (alias) = 1;    SET_DECL_ASSEMBLER_NAME (alias, DECL_NAME (alias));    TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (alias)) = 1;    return alias;}
开发者ID:asdlei00,项目名称:freebsd,代码行数:34,


示例6: c_disregard_inline_limits

intc_disregard_inline_limits (tree fn){  if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn)) != NULL)    return 1;  return (!flag_really_no_inline && DECL_DECLARED_INLINE_P (fn)	  && DECL_EXTERNAL (fn));}
开发者ID:matrixsmaster,项目名称:zpugcc,代码行数:9,


示例7: c_warn_unused_global_decl

boolc_warn_unused_global_decl (tree decl){  if (TREE_CODE (decl) == FUNCTION_DECL && DECL_DECLARED_INLINE_P (decl))    return false;  if (DECL_IN_SYSTEM_HEADER (decl))    return false;  return true;}
开发者ID:matrixsmaster,项目名称:zpugcc,代码行数:10,


示例8: c_cannot_inline_tree_fn

intc_cannot_inline_tree_fn (tree *fnp){  tree fn = *fnp;  bool do_warning = (warn_inline                     && DECL_INLINE (fn)                     && DECL_DECLARED_INLINE_P (fn)                     && !DECL_IN_SYSTEM_HEADER (fn));  if (flag_really_no_inline      && lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn)) == NULL)    {      if (do_warning)        warning (OPT_Winline, "function %q+F can never be inlined because it "                 "is suppressed using -fno-inline", fn);      goto cannot_inline;    }  /* Don't auto-inline anything that might not be bound within     this unit of translation.  */  if (!DECL_DECLARED_INLINE_P (fn) && !targetm.binds_local_p (fn))    {      if (do_warning)        warning (OPT_Winline, "function %q+F can never be inlined because it "                 "might not be bound within this unit of translation", fn);      goto cannot_inline;    }  if (!function_attribute_inlinable_p (fn))    {      if (do_warning)        warning (OPT_Winline, "function %q+F can never be inlined because it "                 "uses attributes conflicting with inlining", fn);      goto cannot_inline;    }  return 0; cannot_inline:  DECL_UNINLINABLE (fn) = 1;  return 1;}
开发者ID:austinsc,项目名称:GCCXML,代码行数:42,


示例9: cxx_warn_unused_global_decl

boolcxx_warn_unused_global_decl (const_tree decl){  if (TREE_CODE (decl) == FUNCTION_DECL && DECL_DECLARED_INLINE_P (decl))    return false;  if (DECL_IN_SYSTEM_HEADER (decl))    return false;  /* Const variables take the place of #defines in C++.  */  if (VAR_P (decl) && TREE_READONLY (decl))    return false;  return true;}
开发者ID:acoxepochlabs,项目名称:gcc,代码行数:14,


示例10: lhd_warn_unused_global_decl

boollhd_warn_unused_global_decl (const_tree decl){  /* This is what used to exist in check_global_declarations.  Probably     not many of these actually apply to non-C languages.  */  if (TREE_CODE (decl) == FUNCTION_DECL && DECL_DECLARED_INLINE_P (decl))    return false;  if (TREE_CODE (decl) == VAR_DECL && TREE_READONLY (decl))    return false;  if (DECL_IN_SYSTEM_HEADER (decl))    return false;  return true;}
开发者ID:IntegerCompany,项目名称:linaro-android-gcc,代码行数:15,


示例11: make_alias_for_thunk

static treemake_alias_for_thunk (tree function){  tree alias;  char buf[256];#if defined (TARGET_IS_PE_COFF)  if (DECL_ONE_ONLY (function))    return function;#endif  ASM_GENERATE_INTERNAL_LABEL (buf, "LTHUNK", thunk_labelno);  thunk_labelno++;  alias = build_decl (FUNCTION_DECL, get_identifier (buf),		      TREE_TYPE (function));  DECL_LANG_SPECIFIC (alias) = DECL_LANG_SPECIFIC (function);  cxx_dup_lang_specific_decl (alias);  DECL_CONTEXT (alias) = NULL;  TREE_READONLY (alias) = TREE_READONLY (function);  TREE_THIS_VOLATILE (alias) = TREE_THIS_VOLATILE (function);  TREE_PUBLIC (alias) = 0;  DECL_INTERFACE_KNOWN (alias) = 1;  DECL_NOT_REALLY_EXTERN (alias) = 1;  DECL_THIS_STATIC (alias) = 1;  DECL_SAVED_FUNCTION_DATA (alias) = NULL;  DECL_DESTRUCTOR_P (alias) = 0;  DECL_CONSTRUCTOR_P (alias) = 0;  DECL_CLONED_FUNCTION (alias) = NULL_TREE;  DECL_EXTERNAL (alias) = 0;  DECL_ARTIFICIAL (alias) = 1;  DECL_NO_STATIC_CHAIN (alias) = 1;  DECL_PENDING_INLINE_P (alias) = 0;  DECL_INLINE (alias) = 0;  DECL_DECLARED_INLINE_P (alias) = 0;  DECL_DEFERRED_FN (alias) = 0;  DECL_USE_TEMPLATE (alias) = 0;  DECL_TEMPLATE_INSTANTIATED (alias) = 0;  DECL_TEMPLATE_INFO (alias) = NULL;  DECL_INITIAL (alias) = error_mark_node;  TREE_ADDRESSABLE (alias) = 1;  TREE_USED (alias) = 1;  SET_DECL_ASSEMBLER_NAME (alias, DECL_NAME (alias));  TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (alias)) = 1;  if (!flag_syntax_only)    assemble_alias (alias, DECL_ASSEMBLER_NAME (function));  return alias;}
开发者ID:Fokycnuk,项目名称:gcc,代码行数:47,


示例12: unpack_ts_function_decl_value_fields

static voidunpack_ts_function_decl_value_fields (struct bitpack_d *bp, tree expr){  DECL_BUILT_IN_CLASS (expr) = bp_unpack_enum (bp, built_in_class,					       BUILT_IN_LAST);  DECL_STATIC_CONSTRUCTOR (expr) = (unsigned) bp_unpack_value (bp, 1);  DECL_STATIC_DESTRUCTOR (expr) = (unsigned) bp_unpack_value (bp, 1);  DECL_UNINLINABLE (expr) = (unsigned) bp_unpack_value (bp, 1);  DECL_POSSIBLY_INLINED (expr) = (unsigned) bp_unpack_value (bp, 1);  DECL_IS_NOVOPS (expr) = (unsigned) bp_unpack_value (bp, 1);  DECL_IS_RETURNS_TWICE (expr) = (unsigned) bp_unpack_value (bp, 1);  DECL_IS_MALLOC (expr) = (unsigned) bp_unpack_value (bp, 1);  DECL_IS_OPERATOR_NEW (expr) = (unsigned) bp_unpack_value (bp, 1);  DECL_DECLARED_INLINE_P (expr) = (unsigned) bp_unpack_value (bp, 1);  DECL_STATIC_CHAIN (expr) = (unsigned) bp_unpack_value (bp, 1);  DECL_NO_INLINE_WARNING_P (expr) = (unsigned) bp_unpack_value (bp, 1);  DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT (expr)    			= (unsigned) bp_unpack_value (bp, 1);  DECL_NO_LIMIT_STACK (expr) = (unsigned) bp_unpack_value (bp, 1);  DECL_DISREGARD_INLINE_LIMITS (expr) = (unsigned) bp_unpack_value (bp, 1);  DECL_PURE_P (expr) = (unsigned) bp_unpack_value (bp, 1);  DECL_LOOPING_CONST_OR_PURE_P (expr) = (unsigned) bp_unpack_value (bp, 1);  if (DECL_BUILT_IN_CLASS (expr) != NOT_BUILT_IN)    {      DECL_FUNCTION_CODE (expr) = (enum built_in_function) bp_unpack_value (bp,	                                                                    11);      if (DECL_BUILT_IN_CLASS (expr) == BUILT_IN_NORMAL	  && DECL_FUNCTION_CODE (expr) >= END_BUILTINS)	fatal_error ("machine independent builtin code out of range");      else if (DECL_BUILT_IN_CLASS (expr) == BUILT_IN_MD)	{          tree result = targetm.builtin_decl (DECL_FUNCTION_CODE (expr), true);	  if (!result || result == error_mark_node)	    fatal_error ("target specific builtin not available");	}    }  if (DECL_STATIC_DESTRUCTOR (expr))    {      priority_type p;      p = (priority_type) bp_unpack_var_len_unsigned (bp);      SET_DECL_FINI_PRIORITY (expr, p);    }}
开发者ID:JuanMiguelBG,项目名称:gcc-4.7.0-PS3,代码行数:43,


示例13: i386_pe_determine_dllexport_p

static booli386_pe_determine_dllexport_p (tree decl){  if (TREE_CODE (decl) != VAR_DECL && TREE_CODE (decl) != FUNCTION_DECL)    return false;  /* Don't export local clones of dllexports.  */  if (!TREE_PUBLIC (decl))    return false;  if (TREE_CODE (decl) == FUNCTION_DECL      && DECL_DECLARED_INLINE_P (decl)      && !flag_keep_inline_dllexport)    return false;   if (lookup_attribute ("dllexport", DECL_ATTRIBUTES (decl)))    return true;  return false;}
开发者ID:Phobos37,项目名称:gcc,代码行数:20,


示例14: i386_pe_type_dllexport_p

booli386_pe_type_dllexport_p (tree decl){  gcc_assert (TREE_CODE (decl) == VAR_DECL               || TREE_CODE (decl) == FUNCTION_DECL);  /* Avoid exporting compiler-generated default dtors and copy ctors.     The only artificial methods that need to be exported are virtual     and non-virtual thunks.  */  if (TREE_CODE (TREE_TYPE (decl)) == METHOD_TYPE      && DECL_ARTIFICIAL (decl) && !DECL_THUNK_P (decl))    return false;  if (TREE_CODE (decl) == FUNCTION_DECL      && DECL_DECLARED_INLINE_P (decl))    {      if (DECL_REALLY_EXTERN (decl)	  || !flag_keep_inline_dllexport)	return false;    }  return true;}
开发者ID:ChaosJohn,项目名称:gcc,代码行数:21,


示例15: make_alias_for

treemake_alias_for (tree target, tree newid){  tree alias = build_decl (DECL_SOURCE_LOCATION (target),			   TREE_CODE (target), newid, TREE_TYPE (target));  DECL_LANG_SPECIFIC (alias) = DECL_LANG_SPECIFIC (target);  cxx_dup_lang_specific_decl (alias);  DECL_CONTEXT (alias) = NULL;  TREE_READONLY (alias) = TREE_READONLY (target);  TREE_THIS_VOLATILE (alias) = TREE_THIS_VOLATILE (target);  TREE_PUBLIC (alias) = 0;  DECL_INTERFACE_KNOWN (alias) = 1;  if (DECL_LANG_SPECIFIC (alias))    {      DECL_NOT_REALLY_EXTERN (alias) = 1;      DECL_USE_TEMPLATE (alias) = 0;      DECL_TEMPLATE_INFO (alias) = NULL;    }  DECL_EXTERNAL (alias) = 0;  DECL_ARTIFICIAL (alias) = 1;  DECL_TEMPLATE_INSTANTIATED (alias) = 0;  if (TREE_CODE (alias) == FUNCTION_DECL)    {      DECL_SAVED_FUNCTION_DATA (alias) = NULL;      DECL_DESTRUCTOR_P (alias) = 0;      DECL_CONSTRUCTOR_P (alias) = 0;      DECL_PENDING_INLINE_P (alias) = 0;      DECL_DECLARED_INLINE_P (alias) = 0;      DECL_INITIAL (alias) = error_mark_node;      DECL_ARGUMENTS (alias) = copy_list (DECL_ARGUMENTS (target));    }  else    TREE_STATIC (alias) = 1;  TREE_ADDRESSABLE (alias) = 1;  TREE_USED (alias) = 1;  SET_DECL_ASSEMBLER_NAME (alias, DECL_NAME (alias));  TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (alias)) = 1;  return alias;}
开发者ID:fabio-d,项目名称:xc16plusplus-source,代码行数:39,


示例16: i386_pe_type_dllimport_p

booli386_pe_type_dllimport_p (tree decl){  gcc_assert (TREE_CODE (decl) == VAR_DECL 	      || TREE_CODE (decl) == FUNCTION_DECL);  if (TARGET_NOP_FUN_DLLIMPORT && TREE_CODE (decl) == FUNCTION_DECL)    return false;  /* We ignore the dllimport attribute for inline member functions.     This differs from MSVC behavior which treats it like GNUC     'extern inline' extension.  Also ignore for template     instantiations with linkonce semantics and artificial methods.  */  if (TREE_CODE (decl) ==  FUNCTION_DECL      && (DECL_DECLARED_INLINE_P (decl)	  || DECL_TEMPLATE_INSTANTIATION (decl)	  || DECL_ARTIFICIAL (decl)))    return false;    /* Overrides of the class dllimport decls by out-of-class definitions are      handled by tree.c:merge_dllimport_decl_attributes.   */  return true;}
开发者ID:nevinhappy,项目名称:gcc,代码行数:23,


示例17: pack_ts_function_decl_value_fields

static voidpack_ts_function_decl_value_fields (struct bitpack_d *bp, tree expr){  bp_pack_enum (bp, built_in_class, BUILT_IN_LAST,		DECL_BUILT_IN_CLASS (expr));  bp_pack_value (bp, DECL_STATIC_CONSTRUCTOR (expr), 1);  bp_pack_value (bp, DECL_STATIC_DESTRUCTOR (expr), 1);  bp_pack_value (bp, DECL_UNINLINABLE (expr), 1);  bp_pack_value (bp, DECL_POSSIBLY_INLINED (expr), 1);  bp_pack_value (bp, DECL_IS_NOVOPS (expr), 1);  bp_pack_value (bp, DECL_IS_RETURNS_TWICE (expr), 1);  bp_pack_value (bp, DECL_IS_MALLOC (expr), 1);  bp_pack_value (bp, DECL_IS_OPERATOR_NEW (expr), 1);  bp_pack_value (bp, DECL_DECLARED_INLINE_P (expr), 1);  bp_pack_value (bp, DECL_STATIC_CHAIN (expr), 1);  bp_pack_value (bp, DECL_NO_INLINE_WARNING_P (expr), 1);  bp_pack_value (bp, DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT (expr), 1);  bp_pack_value (bp, DECL_NO_LIMIT_STACK (expr), 1);  bp_pack_value (bp, DECL_DISREGARD_INLINE_LIMITS (expr), 1);  bp_pack_value (bp, DECL_PURE_P (expr), 1);  bp_pack_value (bp, DECL_LOOPING_CONST_OR_PURE_P (expr), 1);  if (DECL_BUILT_IN_CLASS (expr) != NOT_BUILT_IN)    bp_pack_value (bp, DECL_FUNCTION_CODE (expr), 12);}
开发者ID:Droufte,项目名称:gcc,代码行数:24,


示例18: maybe_add_lambda_conv_op

//.........这里部分代码省略.........	  --processing_template_decl;	}    }  else    call = build_call_a (callop,			 direct_argvec->length (),			 direct_argvec->address ());  CALL_FROM_THUNK_P (call) = 1;  tree stattype = build_function_type (fn_result, FUNCTION_ARG_CHAIN (callop));  /* First build up the conversion op.  */  tree rettype = build_pointer_type (stattype);  tree name = mangle_conv_op_name_for_type (rettype);  tree thistype = cp_build_qualified_type (type, TYPE_QUAL_CONST);  tree fntype = build_method_type_directly (thistype, rettype, void_list_node);  tree convfn = build_lang_decl (FUNCTION_DECL, name, fntype);  tree fn = convfn;  DECL_SOURCE_LOCATION (fn) = DECL_SOURCE_LOCATION (callop);  if (TARGET_PTRMEMFUNC_VBIT_LOCATION == ptrmemfunc_vbit_in_pfn      && DECL_ALIGN (fn) < 2 * BITS_PER_UNIT)    DECL_ALIGN (fn) = 2 * BITS_PER_UNIT;  SET_OVERLOADED_OPERATOR_CODE (fn, TYPE_EXPR);  grokclassfn (type, fn, NO_SPECIAL);  set_linkage_according_to_type (type, fn);  rest_of_decl_compilation (fn, toplevel_bindings_p (), at_eof);  DECL_IN_AGGR_P (fn) = 1;  DECL_ARTIFICIAL (fn) = 1;  DECL_NOT_REALLY_EXTERN (fn) = 1;  DECL_DECLARED_INLINE_P (fn) = 1;  DECL_ARGUMENTS (fn) = build_this_parm (fntype, TYPE_QUAL_CONST);  if (nested_def)    DECL_INTERFACE_KNOWN (fn) = 1;  if (generic_lambda_p)    fn = add_inherited_template_parms (fn, DECL_TI_TEMPLATE (callop));  add_method (type, fn, NULL_TREE);  /* Generic thunk code fails for varargs; we'll complain in mark_used if     the conversion op is used.  */  if (varargs_function_p (callop))    {      DECL_DELETED_FN (fn) = 1;      return;    }  /* Now build up the thunk to be returned.  */  name = get_identifier ("_FUN");  tree statfn = build_lang_decl (FUNCTION_DECL, name, stattype);  fn = statfn;  DECL_SOURCE_LOCATION (fn) = DECL_SOURCE_LOCATION (callop);  if (TARGET_PTRMEMFUNC_VBIT_LOCATION == ptrmemfunc_vbit_in_pfn      && DECL_ALIGN (fn) < 2 * BITS_PER_UNIT)    DECL_ALIGN (fn) = 2 * BITS_PER_UNIT;  grokclassfn (type, fn, NO_SPECIAL);  set_linkage_according_to_type (type, fn);  rest_of_decl_compilation (fn, toplevel_bindings_p (), at_eof);  DECL_IN_AGGR_P (fn) = 1;  DECL_ARTIFICIAL (fn) = 1;  DECL_NOT_REALLY_EXTERN (fn) = 1;
开发者ID:nguyentu1602,项目名称:gcc,代码行数:67,


示例19: print_node

//.........这里部分代码省略.........            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);        if (code == FUNCTION_DECL && DECL_BUILT_IN (node))            fputs (" built-in", file);        if (code == FUNCTION_DECL && DECL_STATIC_CHAIN (node))            fputs (" static-chain", file);        if (TREE_CODE (node) == FUNCTION_DECL && decl_is_tm_clone (node))            fputs (" tm-clone", file);        if (code == FIELD_DECL && DECL_PACKED (node))            fputs (" packed", file);        if (code == FIELD_DECL && DECL_BIT_FIELD (node))            fputs (" bit-field", file);        if (code == FIELD_DECL && DECL_NONADDRESSABLE_P (node))            fputs (" nonaddressable", file);        if (code == LABEL_DECL && EH_LANDING_PAD_NR (node))            fprintf (file, " landing-pad:%d", EH_LANDING_PAD_NR (node));        if (code == VAR_DECL && DECL_IN_TEXT_SECTION (node))            fputs (" in-text-section", file);        if (code == VAR_DECL && DECL_IN_CONSTANT_POOL (node))            fputs (" in-constant-pool", file);        if (code == VAR_DECL && DECL_COMMON (node))            fputs (" common", file);        if (code == VAR_DECL && DECL_THREAD_LOCAL_P (node))        {            fputs (" ", file);            fputs (tls_model_names[DECL_TLS_MODEL (node)], file);        }        if (CODE_CONTAINS_STRUCT (code, TS_DECL_COMMON))        {
开发者ID:RajibTheKing,项目名称:gcc,代码行数:67,


示例20: pp_c_function_specifier

voidpp_c_function_specifier (c_pretty_printer *pp, tree t){  if (TREE_CODE (t) == FUNCTION_DECL && DECL_DECLARED_INLINE_P (t))    pp_c_identifier (pp, "inline");}
开发者ID:DmitrySkiba,项目名称:itoa-toolchain,代码行数:6,


示例21: c_cannot_inline_tree_fn

intc_cannot_inline_tree_fn (tree *fnp){  tree fn = *fnp;  tree t;  bool do_warning = (warn_inline		     && DECL_INLINE (fn)		     && DECL_DECLARED_INLINE_P (fn)		     && !DECL_IN_SYSTEM_HEADER (fn));  if (flag_really_no_inline      && lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn)) == NULL)    {      if (do_warning)	warning ("%Jfunction '%F' can never be inlined because it "		 "is suppressed using -fno-inline", fn, fn);      goto cannot_inline;    }  /* Don't auto-inline anything that might not be bound within     this unit of translation.  */  if (!DECL_DECLARED_INLINE_P (fn) && !(*targetm.binds_local_p) (fn))    {      if (do_warning)	warning ("%Jfunction '%F' can never be inlined because it might not "		 "be bound within this unit of translation", fn, fn);      goto cannot_inline;    }  if (! function_attribute_inlinable_p (fn))    {      if (do_warning)	warning ("%Jfunction '%F' can never be inlined because it uses "		 "attributes conflicting with inlining", fn, fn);      goto cannot_inline;    }  /* If a function has pending sizes, we must not defer its     compilation, and we can't inline it as a tree.  */  if (fn == current_function_decl)    {      t = get_pending_sizes ();      put_pending_sizes (t);      if (t)	{	  if (do_warning)	    warning ("%Jfunction '%F' can never be inlined because it has "		     "pending sizes", fn, fn);	  goto cannot_inline;	}    }  if (! DECL_FILE_SCOPE_P (fn))    {      /* If a nested function has pending sizes, we may have already         saved them.  */      if (DECL_LANG_SPECIFIC (fn)->pending_sizes)	{	  if (do_warning)	    warning ("%Jnested function '%F' can never be inlined because it "		     "has possibly saved pending sizes", fn, fn);	  goto cannot_inline;	}    }  return 0; cannot_inline:  DECL_UNINLINABLE (fn) = 1;  return 1;}
开发者ID:matrixsmaster,项目名称:zpugcc,代码行数:72,


示例22: maybe_clone_body

boolmaybe_clone_body (tree fn){  tree clone;  bool first = true;/* APPLE LOCAL begin ARM structor thunks */  tree clone_to_call;  struct clone_info info;/* APPLE LOCAL end ARM structor thunks */  /* We only clone constructors and destructors.  */  if (!DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P (fn)      && !DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P (fn))    return 0;  /* Emit the DWARF1 abstract instance.  */  (*debug_hooks->deferred_inline_function) (fn);/* APPLE LOCAL begin ARM structor thunks */  /* Figure out whether we can use the 'thunk' implementation,     and if so on which clones. */  info.next_clone = 0;  info.which_thunks_ok = compute_use_thunks (fn);/* APPLE LOCAL end ARM structor thunks */  /* We know that any clones immediately follow FN in the TYPE_METHODS     list.  */  push_to_top_level ();  FOR_EACH_CLONE (clone, fn)    {      tree parm;      tree clone_parm;      int parmno;      splay_tree decl_map;      /* Update CLONE's source position information to match FN's.  */      DECL_SOURCE_LOCATION (clone) = DECL_SOURCE_LOCATION (fn);      DECL_INLINE (clone) = DECL_INLINE (fn);      DECL_DECLARED_INLINE_P (clone) = DECL_DECLARED_INLINE_P (fn);      /* LLVM LOCAL begin inlinehint attribute */      DECL_EXPLICIT_INLINE_P (clone) = DECL_EXPLICIT_INLINE_P (fn);      /* LLVM LOCAL end inlinehint attribute */      DECL_COMDAT (clone) = DECL_COMDAT (fn);      DECL_WEAK (clone) = DECL_WEAK (fn);      DECL_ONE_ONLY (clone) = DECL_ONE_ONLY (fn);      DECL_SECTION_NAME (clone) = DECL_SECTION_NAME (fn);      DECL_USE_TEMPLATE (clone) = DECL_USE_TEMPLATE (fn);      DECL_EXTERNAL (clone) = DECL_EXTERNAL (fn);      DECL_INTERFACE_KNOWN (clone) = DECL_INTERFACE_KNOWN (fn);      DECL_NOT_REALLY_EXTERN (clone) = DECL_NOT_REALLY_EXTERN (fn);      TREE_PUBLIC (clone) = TREE_PUBLIC (fn);      DECL_VISIBILITY (clone) = DECL_VISIBILITY (fn);      DECL_VISIBILITY_SPECIFIED (clone) = DECL_VISIBILITY_SPECIFIED (fn);      /* Adjust the parameter names and locations.  */      parm = DECL_ARGUMENTS (fn);      clone_parm = DECL_ARGUMENTS (clone);      /* Update the `this' parameter, which is always first.  */      update_cloned_parm (parm, clone_parm, first);      parm = TREE_CHAIN (parm);      clone_parm = TREE_CHAIN (clone_parm);      if (DECL_HAS_IN_CHARGE_PARM_P (fn))	parm = TREE_CHAIN (parm);      if (DECL_HAS_VTT_PARM_P (fn))	parm = TREE_CHAIN (parm);      if (DECL_HAS_VTT_PARM_P (clone))	clone_parm = TREE_CHAIN (clone_parm);      for (; parm;	   parm = TREE_CHAIN (parm), clone_parm = TREE_CHAIN (clone_parm))	/* Update this parameter.  */	update_cloned_parm (parm, clone_parm, first);      /* Start processing the function.  */      start_preparsed_function (clone, NULL_TREE, SF_PRE_PARSED);      /* Remap the parameters.  */      decl_map = splay_tree_new (splay_tree_compare_pointers, NULL, NULL);      for (parmno = 0,	     parm = DECL_ARGUMENTS (fn),	     clone_parm = DECL_ARGUMENTS (clone);	   parm;	   ++parmno,	     parm = TREE_CHAIN (parm))	{	  /* Map the in-charge parameter to an appropriate constant.  */	  if (DECL_HAS_IN_CHARGE_PARM_P (fn) && parmno == 1)	    {	      tree in_charge;	      in_charge = in_charge_arg_for_name (DECL_NAME (clone));	      splay_tree_insert (decl_map,				 (splay_tree_key) parm,				 (splay_tree_value) in_charge);	      /* APPLE LOCAL ARM structor thunks */	      info.in_charge_value [info.next_clone] = in_charge;	    }	  else if (DECL_ARTIFICIAL (parm)		   && DECL_NAME (parm) == vtt_parm_identifier)	    {	      /* For a subobject constructor or destructor, the next		 argument is the VTT parameter.  Remap the VTT_PARM//.........这里部分代码省略.........
开发者ID:5432935,项目名称:crossbridge,代码行数:101,


示例23: make_thunk

treemake_thunk (tree function, bool this_adjusting,            tree fixed_offset, tree virtual_offset){    HOST_WIDE_INT d;    tree thunk;    gcc_assert (TREE_CODE (function) == FUNCTION_DECL);    /* We can have this thunks to covariant thunks, but not vice versa.  */    gcc_assert (!DECL_THIS_THUNK_P (function));    gcc_assert (!DECL_RESULT_THUNK_P (function) || this_adjusting);    /* Scale the VIRTUAL_OFFSET to be in terms of bytes.  */    if (this_adjusting && virtual_offset)        virtual_offset            = size_binop (MULT_EXPR,                          virtual_offset,                          convert (ssizetype,                                   TYPE_SIZE_UNIT (vtable_entry_type)));    d = tree_low_cst (fixed_offset, 0);    /* See if we already have the thunk in question.  For this_adjusting       thunks VIRTUAL_OFFSET will be an INTEGER_CST, for covariant thunks it       will be a BINFO.  */    for (thunk = DECL_THUNKS (function); thunk; thunk = TREE_CHAIN (thunk))        if (DECL_THIS_THUNK_P (thunk) == this_adjusting                && THUNK_FIXED_OFFSET (thunk) == d                && !virtual_offset == !THUNK_VIRTUAL_OFFSET (thunk)                && (!virtual_offset                    || (this_adjusting                        ? tree_int_cst_equal (THUNK_VIRTUAL_OFFSET (thunk),                                              virtual_offset)                        : THUNK_VIRTUAL_OFFSET (thunk) == virtual_offset)))            return thunk;    /* All thunks must be created before FUNCTION is actually emitted;       the ABI requires that all thunks be emitted together with the       function to which they transfer control.  */    gcc_assert (!TREE_ASM_WRITTEN (function));    /* Likewise, we can only be adding thunks to a function declared in       the class currently being laid out.  */    gcc_assert (TYPE_SIZE (DECL_CONTEXT (function))                && TYPE_BEING_DEFINED (DECL_CONTEXT (function)));    thunk = build_decl (FUNCTION_DECL, NULL_TREE, TREE_TYPE (function));    DECL_LANG_SPECIFIC (thunk) = DECL_LANG_SPECIFIC (function);    cxx_dup_lang_specific_decl (thunk);    DECL_THUNKS (thunk) = NULL_TREE;    DECL_CONTEXT (thunk) = DECL_CONTEXT (function);    TREE_READONLY (thunk) = TREE_READONLY (function);    TREE_THIS_VOLATILE (thunk) = TREE_THIS_VOLATILE (function);    TREE_PUBLIC (thunk) = TREE_PUBLIC (function);    SET_DECL_THUNK_P (thunk, this_adjusting);    THUNK_TARGET (thunk) = function;    THUNK_FIXED_OFFSET (thunk) = d;    THUNK_VIRTUAL_OFFSET (thunk) = virtual_offset;    THUNK_ALIAS (thunk) = NULL_TREE;    /* The thunk itself is not a constructor or destructor, even if       the thing it is thunking to is.  */    DECL_INTERFACE_KNOWN (thunk) = 1;    DECL_NOT_REALLY_EXTERN (thunk) = 1;    DECL_SAVED_FUNCTION_DATA (thunk) = NULL;    DECL_DESTRUCTOR_P (thunk) = 0;    DECL_CONSTRUCTOR_P (thunk) = 0;    DECL_EXTERNAL (thunk) = 1;    DECL_ARTIFICIAL (thunk) = 1;    /* Even if this thunk is a member of a local class, we don't       need a static chain.  */    DECL_NO_STATIC_CHAIN (thunk) = 1;    /* The THUNK is not a pending inline, even if the FUNCTION is.  */    DECL_PENDING_INLINE_P (thunk) = 0;    DECL_INLINE (thunk) = 0;    DECL_DECLARED_INLINE_P (thunk) = 0;    /* Nor has it been deferred.  */    DECL_DEFERRED_FN (thunk) = 0;    /* Nor is it a template instantiation.  */    DECL_USE_TEMPLATE (thunk) = 0;    DECL_TEMPLATE_INFO (thunk) = NULL;    /* Add it to the list of thunks associated with FUNCTION.  */    TREE_CHAIN (thunk) = DECL_THUNKS (function);    DECL_THUNKS (function) = thunk;    return thunk;}
开发者ID:asdlei00,项目名称:freebsd,代码行数:88,



注:本文中的DECL_DECLARED_INLINE_P函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ DECL_FIELD_OFFSET函数代码示例
C++ DECL_CONTEXT函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。