aboutsummaryrefslogtreecommitdiff
path: root/gdb/ui-out.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2024-05-10 13:13:03 -0600
committerTom Tromey <tromey@adacore.com>2024-05-17 09:23:25 -0600
commit650a81d87bc438c67b077fcf4e529e3e9c772d5d (patch)
treed2ea2bcad3f9c1e2cbc193e80d70bde013d2aa68 /gdb/ui-out.h
parent1f8243f0398689189dfab7a669729a8c447467a8 (diff)
downloadgdb-650a81d87bc438c67b077fcf4e529e3e9c772d5d.zip
gdb-650a81d87bc438c67b077fcf4e529e3e9c772d5d.tar.gz
gdb-650a81d87bc438c67b077fcf4e529e3e9c772d5d.tar.bz2
Inline some ui_out methods
I noticed a few ui_out methods that are just trivial wrappers. This patch moves these to ui-out.h, as it seems like they should be inlineable. Approved-By: Andrew Burgess <aburgess@redhat.com>
Diffstat (limited to 'gdb/ui-out.h')
-rw-r--r--gdb/ui-out.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/gdb/ui-out.h b/gdb/ui-out.h
index 5b6ddd5..74b570b 100644
--- a/gdb/ui-out.h
+++ b/gdb/ui-out.h
@@ -163,6 +163,8 @@ class ui_out
explicit ui_out (ui_out_flags flags = 0);
virtual ~ui_out ();
+ DISABLE_COPY_AND_ASSIGN (ui_out);
+
void push_level (ui_out_type type);
void pop_level (ui_out_type type);
@@ -203,8 +205,8 @@ class ui_out
const char *format, ...)
ATTRIBUTE_PRINTF (4, 5);
- void spaces (int numspaces);
- void text (const char *string);
+ void spaces (int numspaces) { do_spaces (numspaces); }
+ void text (const char *string) { do_text (string); }
void text (const std::string &string) { text (string.c_str ()); }
/* Output a printf-style formatted string. In addition to the usual
@@ -255,21 +257,22 @@ class ui_out
void vmessage (const ui_file_style &in_style,
const char *format, va_list args) ATTRIBUTE_PRINTF (3, 0);
- void wrap_hint (int indent);
+ void wrap_hint (int indent) { do_wrap_hint (indent); }
- void flush ();
+ void flush () { do_flush (); }
/* Redirect the output of a ui_out object temporarily. */
- void redirect (ui_file *outstream);
+ void redirect (ui_file *outstream) { do_redirect (outstream); }
- ui_out_flags test_flags (ui_out_flags mask);
+ ui_out_flags test_flags (ui_out_flags mask)
+ { return m_flags & mask; }
/* HACK: Code in GDB is currently checking to see the type of ui_out
builder when determining which output to produce. This function is
a hack to encapsulate that test. Once GDB manages to separate the
CLI/MI from the core of GDB the problem should just go away .... */
- bool is_mi_like_p () const;
+ bool is_mi_like_p () const { return do_is_mi_like_p (); }
bool query_table_field (int colno, int *width, int *alignment,
const char **col_name);