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

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

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

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

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

示例1: oacc_replace_fn_attrib

voidoacc_replace_fn_attrib (tree fn, tree dims){  tree ident = get_identifier (OACC_FN_ATTRIB);  tree attribs = DECL_ATTRIBUTES (fn);  /* If we happen to be present as the first attrib, drop it.  */  if (attribs && TREE_PURPOSE (attribs) == ident)    attribs = TREE_CHAIN (attribs);  DECL_ATTRIBUTES (fn) = tree_cons (ident, dims, attribs);}
开发者ID:WojciechMigda,项目名称:gcc,代码行数:11,


示例2: maybe_add_dllexport

static inline void maybe_add_dllexport (tree decl) {  if (i386_pe_type_dllexport_p (decl))    {         tree decl_attrs = DECL_ATTRIBUTES (decl);      if (lookup_attribute ("dllexport", decl_attrs) != NULL_TREE)	/* Already done.  */	return;      DECL_ATTRIBUTES (decl) = tree_cons (get_identifier ("dllexport"),					  NULL_TREE, decl_attrs);    }}
开发者ID:nevinhappy,项目名称:gcc,代码行数:12,


示例3: get_attribute

const_tree get_attribute(const char* attr_name, const_tree decl){	const_tree attr = lookup_attribute(attr_name, DECL_ATTRIBUTES(decl));	if (attr && TREE_VALUE(attr))		return attr;	return NULL_TREE;}
开发者ID:ephox-gcc-plugins,项目名称:size_overflow,代码行数:7,


示例4: write_ts_decl_common_tree_pointers

static voidwrite_ts_decl_common_tree_pointers (struct output_block *ob, tree expr,				    bool ref_p){  stream_write_tree (ob, DECL_SIZE (expr), ref_p);  stream_write_tree (ob, DECL_SIZE_UNIT (expr), ref_p);  /* Note, DECL_INITIAL is not handled here.  Since DECL_INITIAL needs     special handling in LTO, it must be handled by streamer hooks.  */  stream_write_tree (ob, DECL_ATTRIBUTES (expr), ref_p);  /* Do not stream DECL_ABSTRACT_ORIGIN.  We cannot handle debug information     for early inlining so drop it on the floor instead of ICEing in     dwarf2out.c.  */  if (TREE_CODE (expr) == PARM_DECL)    streamer_write_chain (ob, TREE_CHAIN (expr), ref_p);  if ((TREE_CODE (expr) == VAR_DECL       || TREE_CODE (expr) == PARM_DECL)      && DECL_HAS_VALUE_EXPR_P (expr))    stream_write_tree (ob, DECL_VALUE_EXPR (expr), ref_p);  if (TREE_CODE (expr) == VAR_DECL)    stream_write_tree (ob, DECL_DEBUG_EXPR (expr), ref_p);}
开发者ID:Samsara00,项目名称:DragonFlyBSD,代码行数:27,


示例5: solaris_insert_attributes

voidsolaris_insert_attributes (tree decl, tree *attributes){  tree *x, next;  if (solaris_pending_aligns != NULL && TREE_CODE (decl) == VAR_DECL)    for (x = &solaris_pending_aligns; *x; x = &TREE_CHAIN (*x))      {        tree name = TREE_PURPOSE (*x);        tree value = TREE_VALUE (*x);        if (DECL_NAME (decl) == name)          {            if (lookup_attribute ("aligned", DECL_ATTRIBUTES (decl))                || lookup_attribute ("aligned", *attributes))              warning (0, "ignoring %<#pragma align%> for explicitly "                       "aligned %q+D", decl);            else              *attributes = tree_cons (get_identifier ("aligned"), value,                                       *attributes);            next = TREE_CHAIN (*x);            ggc_free (*x);            *x = next;            break;          }      }  if (solaris_pending_inits != NULL && TREE_CODE (decl) == FUNCTION_DECL)    for (x = &solaris_pending_inits; *x; x = &TREE_CHAIN (*x))      {        tree name = TREE_PURPOSE (*x);        if (DECL_NAME (decl) == name)          {            *attributes = tree_cons (get_identifier ("init"), NULL,                                     *attributes);            *attributes = tree_cons (get_identifier ("used"), NULL,                                     *attributes);            next = TREE_CHAIN (*x);            ggc_free (*x);            *x = next;            break;          }      }  if (solaris_pending_finis != NULL && TREE_CODE (decl) == FUNCTION_DECL)    for (x = &solaris_pending_finis; *x; x = &TREE_CHAIN (*x))      {        tree name = TREE_PURPOSE (*x);        if (DECL_NAME (decl) == name)          {            *attributes = tree_cons (get_identifier ("fini"), NULL,                                     *attributes);            *attributes = tree_cons (get_identifier ("used"), NULL,                                     *attributes);            next = TREE_CHAIN (*x);            ggc_free (*x);            *x = next;            break;          }      }}
开发者ID:Abioy,项目名称:gccxml,代码行数:60,


示例6: lto_input_ts_decl_common_tree_pointers

static voidlto_input_ts_decl_common_tree_pointers (struct lto_input_block *ib,					struct data_in *data_in, tree expr){  DECL_SIZE (expr) = stream_read_tree (ib, data_in);  DECL_SIZE_UNIT (expr) = stream_read_tree (ib, data_in);  DECL_ATTRIBUTES (expr) = stream_read_tree (ib, data_in);  /* Do not stream DECL_ABSTRACT_ORIGIN.  We cannot handle debug information     for early inlining so drop it on the floor instead of ICEing in     dwarf2out.c.  */  if (TREE_CODE (expr) == PARM_DECL)    TREE_CHAIN (expr) = streamer_read_chain (ib, data_in);  if ((TREE_CODE (expr) == VAR_DECL       || TREE_CODE (expr) == PARM_DECL)      && DECL_HAS_VALUE_EXPR_P (expr))    SET_DECL_VALUE_EXPR (expr, stream_read_tree (ib, data_in));  if (TREE_CODE (expr) == VAR_DECL)    {      tree dexpr = stream_read_tree (ib, data_in);      if (dexpr)	SET_DECL_DEBUG_EXPR (expr, dexpr);    }}
开发者ID:JuanMiguelBG,项目名称:gcc-4.7.0-PS3,代码行数:27,


示例7: solaris_output_init_fini

voidsolaris_output_init_fini (FILE *file, tree decl){  if (lookup_attribute ("init", DECL_ATTRIBUTES (decl)))    {      fprintf (file, "/t.pushsection/t/".init/"/n");      ASM_OUTPUT_CALL (file, decl);      fprintf (file, "/t.popsection/n");    }  if (lookup_attribute ("fini", DECL_ATTRIBUTES (decl)))    {      fprintf (file, "/t.pushsection/t/".fini/"/n");      ASM_OUTPUT_CALL (file, decl);      fprintf (file, "/t.popsection/n");    }}
开发者ID:Abioy,项目名称:gccxml,代码行数:17,


示例8: 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,


示例9: 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,


示例10: 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,


示例11: build_module_descriptor

voidbuild_module_descriptor (long vers, tree attr){  tree decls, *chain = NULL;#ifdef OBJCPLUS  push_lang_context (lang_name_c); /* extern "C" */#endif  objc_module_template = objc_start_struct (get_identifier (UTAG_MODULE));  /* long version; */  decls = add_field_decl (long_integer_type_node, "version", &chain);  /* long size; */  add_field_decl (long_integer_type_node, "size", &chain);  /* char *name; */  add_field_decl (string_type_node, "name", &chain);  /* struct _objc_symtab *symtab; */  add_field_decl (build_pointer_type (xref_tag (RECORD_TYPE,						get_identifier (UTAG_SYMTAB))),		  "symtab", &chain);  objc_finish_struct (objc_module_template, decls);  /* Create an instance of "_objc_module".  */  UOBJC_MODULES_decl = start_var_decl (objc_module_template,				       /* FIXME - why the conditional					  if the symbol is the					  same.  */				       flag_next_runtime ? "_OBJC_Module" :  "_OBJC_Module");  /* This is the root of the metadata for defined classes and categories, it     is referenced by the runtime and, therefore, needed.  */  DECL_PRESERVE_P (UOBJC_MODULES_decl) = 1;  /* Squash `defined but not used' warning.  */  TREE_USED (UOBJC_MODULES_decl) = 1;  /* Allow the runtime to mark meta-data such that it can be assigned to target     specific sections by the back-end.  */  if (attr)    DECL_ATTRIBUTES (UOBJC_MODULES_decl) = attr;  finish_var_decl (UOBJC_MODULES_decl,		   init_module_descriptor (TREE_TYPE (UOBJC_MODULES_decl),					   vers));#ifdef OBJCPLUS  pop_lang_context ();#endif}
开发者ID:gmarkall,项目名称:gcc,代码行数:54,


示例12: gate_latent_entropy

static bool gate_latent_entropy(void){	// don't bother with noreturn functions for now	if (TREE_THIS_VOLATILE(current_function_decl))		return false;	// gcc-4.5 doesn't discover some trivial noreturn functions	if (EDGE_COUNT(EXIT_BLOCK_PTR_FOR_FN(cfun)->preds) == 0)		return false;	return lookup_attribute("latent_entropy", DECL_ATTRIBUTES(current_function_decl)) != NULL_TREE;}
开发者ID:ParrotSec,项目名称:linux-psec,代码行数:12,


示例13: instrument_assignments_plugin_exec

static unsigned int instrument_assignments_plugin_exec(void){#ifdef DEBUG    fprintf(stderr, "* Inspecting function `%s'/n", FN_NAME);#endif    basic_block bb;    FOR_EACH_BB(bb) {        gimple_stmt_iterator gsi;        for (gsi = gsi_start_bb(bb) ; !gsi_end_p(gsi) ; gsi_next(&gsi)) {            gimple curr_stmt = gsi_stmt(gsi);            tree lhs = gimple_get_lhs(curr_stmt);            // We only care about assignments to “real” variables 
C++ DECL_BUILT_IN_CLASS函数代码示例
C++ DECL_ARTIFICIAL函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。