mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-03-21 02:10:53 +00:00
-dump option, by default the IR is not dumped anymore
This commit is contained in:
parent
1638cc9f01
commit
107100c666
3 changed files with 8 additions and 1 deletions
1
gmqcc.h
1
gmqcc.h
|
@ -970,6 +970,7 @@ extern const char *opts_output; /* -o file */
|
|||
extern int opts_standard;
|
||||
extern bool opts_debug;
|
||||
extern bool opts_memchk;
|
||||
extern bool opts_dump;
|
||||
|
||||
/*===================================================================*/
|
||||
#define OPTS_FLAG(i) (!! (opts_flags[(i)/32] & (1<< ((i)%32))))
|
||||
|
|
5
main.c
5
main.c
|
@ -30,6 +30,7 @@ const char *opts_output = "progs.dat";
|
|||
int opts_standard = COMPILER_GMQCC;
|
||||
bool opts_debug = false;
|
||||
bool opts_memchk = false;
|
||||
bool opts_dump = false;
|
||||
|
||||
typedef struct { char *filename; int type; } argitem;
|
||||
VECTOR_MAKE(argitem, items);
|
||||
|
@ -179,6 +180,10 @@ static bool options_parse(int argc, char **argv) {
|
|||
opts_debug = true;
|
||||
continue;
|
||||
}
|
||||
if (!strcmp(argv[0]+1, "dump")) {
|
||||
opts_dump = true;
|
||||
continue;
|
||||
}
|
||||
if (!strcmp(argv[0]+1, "memchk")) {
|
||||
opts_memchk = true;
|
||||
continue;
|
||||
|
|
3
parser.c
3
parser.c
|
@ -1923,7 +1923,8 @@ bool parser_finish(const char *output)
|
|||
}
|
||||
}
|
||||
|
||||
ir_builder_dump(ir, printf);
|
||||
if (opts_dump)
|
||||
ir_builder_dump(ir, printf);
|
||||
|
||||
if (!ir_builder_generate(ir, output)) {
|
||||
printf("*** failed to generate output file\n");
|
||||
|
|
Loading…
Reference in a new issue