regtools: fix headergen variadic macro generation
Change-Id: I5e2439e5dcbeaaafda75c6ea457e53ee1ba26463
This commit is contained in:
parent
8927df4205
commit
49db199a36
1 changed files with 3 additions and 3 deletions
|
@ -28,7 +28,7 @@
|
|||
#include <sys/types.h>
|
||||
#include <getopt.h>
|
||||
|
||||
#define HEADERGEN_VERSION "2.1.7"
|
||||
#define HEADERGEN_VERSION "2.1.8"
|
||||
|
||||
#define error(...) do{ fprintf(stderr, __VA_ARGS__); exit(1); } while(0)
|
||||
|
||||
|
@ -493,9 +493,9 @@ void gen_macro(const std::string& filename, bool variadic)
|
|||
gen_macro_list(f, "_", MAX_NARGS, 1, ", ");
|
||||
fprintf(f, ", N, ...) N\n\n");
|
||||
|
||||
fprintf(f, "#define REG_VARIADIC(macro, reg, ...) REG_VARIADIC_(macro, NARG(__VA_ARGS__), reg, __VA_ARGS__)\n");
|
||||
fprintf(f, "#define REG_VARIADIC(macro, reg, ...) REG_VARIADIC_(macro, REG_NARG(__VA_ARGS__), reg, __VA_ARGS__)\n");
|
||||
fprintf(f, "#define REG_VARIADIC_(macro, cnt, reg, ...) REG_VARIADIC__(macro, cnt, reg, __VA_ARGS__)\n");
|
||||
fprintf(f, "#define REG_VARIADIC__(macro, cnt, reg, ...) REG_VARIADIC___(macro##cnt, reg, ...)\n");
|
||||
fprintf(f, "#define REG_VARIADIC__(macro, cnt, reg, ...) REG_VARIADIC___(macro##cnt, reg, __VA_ARGS__)\n");
|
||||
fprintf(f, "#define REG_VARIADIC___(macro, reg, ...) macro(reg, __VA_ARGS__)\n\n");
|
||||
|
||||
fprintf(f, "#define BM_OR(reg, ...) REG_VARIADIC(BM_OR, reg, __VA_ARGS__)\n");
|
||||
|
|
Loading…
Reference in a new issue