tccpp: Add -bench -E mode
for benchmarking the preprocessor, without having to use the PP_BENCH macro. No output will be produced for '-E -bench', so it's the raw tokenization/preprocess speed.
This commit is contained in:
parent
2a0167adfe
commit
de06193d88
1 changed files with 5 additions and 5 deletions
10
tccpp.c
10
tccpp.c
|
|
@ -3992,11 +3992,11 @@ ST_FUNC int tcc_preprocess(TCCState *s1)
|
|||
if (s1->Pflag == LINE_MACRO_OUTPUT_FORMAT_P10)
|
||||
parse_flags |= PARSE_FLAG_TOK_NUM, s1->Pflag = 1;
|
||||
|
||||
#ifdef PP_BENCH
|
||||
/* for PP benchmarks */
|
||||
do next(); while (tok != TOK_EOF);
|
||||
return 0;
|
||||
#endif
|
||||
if (s1->do_bench) {
|
||||
/* for PP benchmarks */
|
||||
do next(); while (tok != TOK_EOF);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (s1->dflag & 1) {
|
||||
pp_debug_builtins(s1);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue