From d0b432ab38b09cd167d8a8065ffe1e14878d6e2d Mon Sep 17 00:00:00 2001 From: grischka Date: Mon, 29 Jun 2009 20:14:53 +0100 Subject: cleanup: stop abuse of sym->r for inline functions --- tcc.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'tcc.h') diff --git a/tcc.h b/tcc.h index be9c4cc..0db48e2 100644 --- a/tcc.h +++ b/tcc.h @@ -262,7 +262,6 @@ typedef struct { #define FUNC_CALL(r) (((func_attr_t*)&(r))->func_call) #define FUNC_EXPORT(r) (((func_attr_t*)&(r))->func_export) #define FUNC_ARGS(r) (((func_attr_t*)&(r))->func_args) -#define INLINE_DEF(r) (*(int **)&(r)) /* -------------------------------------------------- */ #define SYM_STRUCT 0x40000000 /* struct/union/enum symbol space */ @@ -331,6 +330,13 @@ typedef struct TokenString { int last_line_num; } TokenString; +/* inline functions */ +typedef struct InlineFunc { + int *token_str; + Sym *sym; + char filename[1]; +} InlineFunc; + /* include file cache, used to find files faster and also to eliminate inclusion if the include file is protected by #ifndef ... #endif */ typedef struct CachedInclude { @@ -362,7 +368,6 @@ typedef struct ASMOperand { int is_memory; /* true if memory operand */ int is_rw; /* for '+' modifier */ } ASMOperand; - #endif struct TCCState { @@ -479,6 +484,9 @@ struct TCCState { /* for tcc_relocate */ int runtime_added; + struct InlineFunc **inline_fns; + int nb_inline_fns; + #ifdef TCC_TARGET_X86_64 /* write PLT and GOT here */ char *runtime_plt_and_got; -- cgit v1.3.1