From: Wolfgang Bumiller Date: Sat, 1 Jun 2013 16:16:50 +0000 (+0200) Subject: fix: dotranslate now sets AST_FLAG_INCLUDE_DEF to not get removed by -Ostrip-constant... X-Git-Tag: xonotic-v0.7.0~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ed585f8c048ea3cf591ee9f59963b02171d94424;p=xonotic%2Fgmqcc.git fix: dotranslate now sets AST_FLAG_INCLUDE_DEF to not get removed by -Ostrip-constant-names --- diff --git a/parser.c b/parser.c index 7fba786..1b9e7c7 100644 --- a/parser.c +++ b/parser.c @@ -266,6 +266,7 @@ static ast_value* parser_const_string(parser_t *parser, const char *str, bool do char name[32]; util_snprintf(name, sizeof(name), "dotranslate_%lu", (unsigned long)(parser->translated++)); ast_value_set_name(out, name); + out->expression.flags |= AST_FLAG_INCLUDE_DEF; } return out; } @@ -284,6 +285,7 @@ static ast_value* parser_const_string(parser_t *parser, const char *str, bool do out->cvq = CV_CONST; out->hasvalue = true; out->isimm = true; + out->expression.flags |= AST_FLAG_INCLUDE_DEF; out->constval.vstring = parser_strdup(str); vec_push(parser->imm_string, out); util_htseth(parser->ht_imm_string, str, hash, out);