public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Rename is_cplus_template_function
@ 2024-06-14 17:17 Tom Tromey
0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2024-06-14 17:17 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6b23978d2e6f7e36f46efece7ec13918d258fbc9
commit 6b23978d2e6f7e36f46efece7ec13918d258fbc9
Author: Tom Tromey <tromey@adacore.com>
Date: Thu May 23 09:14:58 2024 -0600
Rename is_cplus_template_function
This patch renames is_cplus_template_function to is_template_function.
There is nothing C++-specific about this code, and the code in the
DWARF reader that creates these objects is not C++-specific. In fact
this may already be used by Rust (though I didn't check).
Diff:
---
gdb/cp-namespace.c | 2 +-
gdb/symtab.h | 8 ++++++--
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/gdb/cp-namespace.c b/gdb/cp-namespace.c
index 4434ddff79c..544ebcfddb7 100644
--- a/gdb/cp-namespace.c
+++ b/gdb/cp-namespace.c
@@ -577,7 +577,7 @@ cp_lookup_symbol_imports_or_template (const char *scope,
if (function != NULL && function->language () == language_cplus)
{
/* Search the function's template parameters. */
- if (function->is_cplus_template_function ())
+ if (function->is_template_function ())
{
struct template_symbol *templ
= (struct template_symbol *) function;
diff --git a/gdb/symtab.h b/gdb/symtab.h
index d96b3cc1273..d5fe90a19d9 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -1346,7 +1346,11 @@ struct symbol : public general_symbol_info, public allocate_on_obstack<symbol>
m_is_inlined = is_inlined;
}
- bool is_cplus_template_function () const
+ /* Return true if this symbol is a template function. Template
+ functions actually are of type 'template_symbol' and have extra
+ symbols (the template parameters) attached. */
+
+ bool is_template_function () const
{
return this->subclass == SYMBOL_TEMPLATE;
}
@@ -1593,7 +1597,7 @@ extern int register_symbol_register_impl (enum address_class,
/* An instance of this type is used to represent a C++ template
function. A symbol is really of this type iff
- symbol::is_cplus_template_function is true. */
+ symbol::is_template_function is true. */
struct template_symbol : public symbol
{
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-06-14 17:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-14 17:17 [binutils-gdb] Rename is_cplus_template_function Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).