Skip to content

Commit 33c3873

Browse files
author
Yihao Wu
committed
Add inline attr to function decl
To tell a function is inline or not. Note that this only indicates if the functions is attributed with "inline", it can't tell whether gcc really decides to inline it. Signed-off-by: Yihao Wu <[email protected]>
1 parent 99ab6a0 commit 33c3873

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

generate-tree-c.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,9 @@ def add_complex_getter(name, doc):
652652
add_simple_getter('result',
653653
'PyGccTree_New(gcc_private_make_tree(DECL_RESULT_FLD(self->t.inner)))',
654654
'The gcc.ResultDecl for the return value')
655+
add_simple_getter('inline',
656+
'PyBool_FromLong(DECL_DECLARED_INLINE_P(self->t.inner))',
657+
'If function is declared as inline')
655658
getsettable.add_gsdef('callgraph_node',
656659
'PyGccFunctionDecl_get_callgraph_node',
657660
None,

0 commit comments

Comments
 (0)