File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -529,6 +529,8 @@ const char* fn_attribute_to_string(gcc_jit_fn_attribute attr)
529
529
return " visibility" ;
530
530
case GCC_JIT_FN_ATTRIBUTE_COLD:
531
531
return " cold" ;
532
+ case GCC_JIT_FN_ATTRIBUTE_RETURNS_TWICE:
533
+ return " returns_twice" ;
532
534
}
533
535
return NULL ;
534
536
}
@@ -667,6 +669,9 @@ new_function (location *loc,
667
669
TREE_USED (fndecl) = 1 ;
668
670
DECL_PRESERVE_P (fndecl) = 1 ;
669
671
}
672
+ /* See handle_returns_twice_attribute in gcc/c-family/c-attribs.cc. */
673
+ else if (attr == GCC_JIT_FN_ATTRIBUTE_RETURNS_TWICE)
674
+ DECL_IS_RETURNS_TWICE (fndecl) = 1 ;
670
675
671
676
const char * attribute = fn_attribute_to_string (attr);
672
677
if (attribute)
Original file line number Diff line number Diff line change @@ -2104,6 +2104,7 @@ enum gcc_jit_fn_attribute
2104
2104
GCC_JIT_FN_ATTRIBUTE_USED,
2105
2105
GCC_JIT_FN_ATTRIBUTE_VISIBILITY,
2106
2106
GCC_JIT_FN_ATTRIBUTE_COLD,
2107
+ GCC_JIT_FN_ATTRIBUTE_RETURNS_TWICE,
2107
2108
};
2108
2109
2109
2110
/* Add an attribute to a function. */
You can’t perform that action at this time.
0 commit comments