]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Rename is_cplus_template_function
authorTom Tromey <tromey@adacore.com>
Thu, 23 May 2024 15:14:58 +0000 (09:14 -0600)
committerTom Tromey <tromey@adacore.com>
Fri, 14 Jun 2024 16:56:36 +0000 (10:56 -0600)
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).

gdb/cp-namespace.c
gdb/symtab.h

index 4434ddff79cc59a83fd13b73353c865e0f53ab95..544ebcfddb78f8f29dac18ba9495084ffd27d618 100644 (file)
@@ -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;
index d96b3cc127358e6f6f44da9db73c50ee6995a1be..d5fe90a19d96045eaf4e8cc751d87fa7983658ac 100644 (file)
@@ -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
 {