cleanup: stop abuse of sym->r for inline functions

This commit is contained in:
grischka
2009-06-29 20:14:53 +01:00
committed by unknown
parent 5e83b64dae
commit d0b432ab38
2 changed files with 30 additions and 27 deletions

12
tcc.h
View File

@ -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;