path: root/asm/pptok.dat
diff options
authorH. Peter Anvin (Intel) <hpa@zytor.com>2019-08-14 23:45:57 -0700
committerH. Peter Anvin (Intel) <hpa@zytor.com>2019-08-14 23:50:37 -0700
commit5e3d741b00ecbcfbc682697f033d698fce8b38b3 (patch)
tree9900a2a038ab166b18b92bdd7f33899a7b8038cf /asm/pptok.dat
parent522bcad4aebc54ce4107db851c91628dc94e1ed1 (diff)
preproc: introduce alias smacros, cleanups
Introduce "alias smacros", which are the smacro equivalent of symlinks; when used with the various smacro-defining and undefining directives, they affect the macro they are aliased to. Only explicit %defalias, %idefalias, and %undefalias affect them. This is intended for being able to rename macros while retaining the legacy names. This patch also removes an *astonishing* amount of duplicated code: 1. Every caller to defined_smacro() and undef_smacro() would call get_ctx() to mangle the macro name; push that into those functions. 2. Common code to get an smacro identifier. 3. Every code path that returns DIRECTIVE_FOUND also has to do free_tlist(origline); make it do so. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Diffstat (limited to 'asm/pptok.dat')
1 files changed, 3 insertions, 0 deletions
diff --git a/asm/pptok.dat b/asm/pptok.dat
index a5a6e590..2a465d43 100644
--- a/asm/pptok.dat
+++ b/asm/pptok.dat
@@ -50,6 +50,7 @@
@@ -65,6 +66,7 @@
@@ -93,6 +95,7 @@