This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] sim: sim-close: use XCONCAT2 helper
- From: Michael Frysinger <vapier at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 17 Nov 2015 05:48:28 -0000
- Subject: [binutils-gdb] sim: sim-close: use XCONCAT2 helper
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=146b80ff180c0490fa920c183d665f536f2a4b0b
commit 146b80ff180c0490fa920c183d665f536f2a4b0b
Author: Mike Frysinger <vapier@gentoo.org>
Date: Mon Nov 16 00:12:23 2015 -0800
sim: sim-close: use XCONCAT2 helper
No point in open coding this logic when we've got nifty helpers to do it.
Diff:
---
sim/common/ChangeLog | 5 +++++
sim/common/sim-close.c | 4 +---
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index bdb657f..7c0ef37 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,8 @@
+2015-11-16 Mike Frysinger <vapier@gentoo.org>
+
+ * sim-close.c (__cgen_cpu_close, _cgen_cpu_close): Delete.
+ (cgen_cpu_close): Change to XCONCAT2.
+
2015-11-15 Mike Frysinger <vapier@gentoo.org>
* Make-common.in (SIM_NEW_COMMON_OBJS): Add sim-reason.o, sim-reg.o,
diff --git a/sim/common/sim-close.c b/sim/common/sim-close.c
index a1458d4..b7b7429 100644
--- a/sim/common/sim-close.c
+++ b/sim/common/sim-close.c
@@ -36,9 +36,7 @@ sim_close (SIM_DESC sd, int quitting)
/* If cgen is active, close it down. */
#ifdef CGEN_ARCH
-# define __cgen_cpu_close(arch) arch##_cgen_cpu_close
-# define _cgen_cpu_close(arch) __cgen_cpu_close (arch)
-# define cgen_cpu_close _cgen_cpu_close (CGEN_ARCH)
+# define cgen_cpu_close XCONCAT2 (CGEN_ARCH,_cgen_cpu_close)
cgen_cpu_close (CPU_CPU_DESC (STATE_CPU (sd, 0)));
#endif