aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@tv-sign.ru>2006-01-02 22:20:17 +0300
committerJosh Triplett <josh@freedesktop.org>2006-12-05 03:06:16 -0800
commit07ad7987620f13b96a52c890fcfc609d1de8da5e (patch)
tree14ef6f19cbd6a05a00d5657c4f94e3b5a537af67 /symbol.h
parentfix 'weak' attribute loss (diff)
downloadsparse-07ad7987620f13b96a52c890fcfc609d1de8da5e.tar.gz
sparse-07ad7987620f13b96a52c890fcfc609d1de8da5e.tar.bz2
sparse-07ad7987620f13b96a52c890fcfc609d1de8da5e.zip
prepare for #strong_{define,undef}
This patch renames symbol->weak to symbol->attr and adds symbolic names for it's values. I don't like the new name, and will be happy to rename if you suggest me something different. Probably it is also better to move ->attr into the NS_MACRO part of the union and make it integer. No changes in pre-process.o Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Diffstat (limited to 'symbol.h')
-rw-r--r--symbol.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/symbol.h b/symbol.h
index 498e6e3..0803710 100644
--- a/symbol.h
+++ b/symbol.h
@@ -82,10 +82,13 @@ struct symbol_op {
extern int expand_safe_p(struct expression *expr, int cost);
extern int expand_constant_p(struct expression *expr, int cost);
+#define SYM_ATTR_WEAK 1
+#define SYM_ATTR_NORMAL 0
+
struct symbol {
enum namespace namespace:8;
enum type type:8;
- unsigned char used:1, weak:1;
+ unsigned char used:1, attr:1;
struct position pos; /* Where this symbol was declared */
struct ident *ident; /* What identifier this symbol is associated with */
struct symbol *next_id; /* Next semantic symbol that shares this identifier */