From 76ca72bc5b72ac0bbab239bda41cd61f6cb7d051 Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Tue, 20 Oct 2020 13:41:18 +0100 Subject: gdb: remove LA_EMIT_CHAR macro Now that every use of the LA_EMIT_CHAR macro is within a language_defn member function we can simply call the emitchar member function directly instead of using the LA_EMIT_CHAR macro. If we are ever inside a language object, for example, cplus_language, while current_language points at something other than cplus_language then this commit will result in a change in behaviour. However, I believe if we did have such a difference then this would be a bug in GDB. AS such I'm going to claim there _should_ be no user visible changes from this commit. gdb/ChangeLog: * c-lang.c (language_defn::printchar): Call emitchar, not LA_EMIT_CHAR. * f-lang.h (f_language::printchar): Likewise. * language.h (LA_EMIT_CHAR): Delete macro. * rust-lang.c (rust_language::printchar): Call emitchar, not LA_EMIT_CHAR. --- gdb/rust-lang.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/rust-lang.c') diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c index 3a9a4e7..96ae075 100644 --- a/gdb/rust-lang.c +++ b/gdb/rust-lang.c @@ -2054,7 +2054,7 @@ public: struct ui_file *stream) const override { fputs_filtered ("'", stream); - LA_EMIT_CHAR (ch, chtype, stream, '\''); + emitchar (ch, chtype, stream, '\''); fputs_filtered ("'", stream); } -- cgit v1.1