-fsingle-vector-defs to disable _x,_y,_z generation

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-12-18 12:47:48 +01:00
parent 116d744823
commit d09ab90f24
3 changed files with 8 additions and 2 deletions

View file

@ -251,3 +251,8 @@ Produce a linenumber file along with the output .dat file.
Use C's operator precedence for ternary expressions. Unless your code
depends on fteqcc-compatible behaviour, you'll want to use thi
soption.
.TP
.B -fsingle-vector-defs
Normally vectors generate 4 defs, once for the vector, and once for
its components with _x, _y, _z suffixes. This option
prevents components from being listed.

4
ir.c
View file

@ -3152,7 +3152,7 @@ static void gen_vector_defs(prog_section_def def, const char *name)
char *component;
size_t len, i;
if (!name)
if (!name || OPTS_FLAG(SINGLE_VECTOR_DEFS))
return;
len = strlen(name);
@ -3178,7 +3178,7 @@ static void gen_vector_fields(prog_section_field fld, const char *name)
char *component;
size_t len, i;
if (!name)
if (!name || OPTS_FLAG(SINGLE_VECTOR_DEFS))
return;
len = strlen(name);

View file

@ -39,6 +39,7 @@
GMQCC_DEFINE_FLAG(ASSIGN_FUNCTION_TYPES)
GMQCC_DEFINE_FLAG(LNO)
GMQCC_DEFINE_FLAG(CORRECT_TERNARY)
GMQCC_DEFINE_FLAG(SINGLE_VECTOR_DEFS)
#endif
/* warning flags */