ubsan: score: left shift of negative value
[deliverable/binutils-gdb.git] / gdb / stabsread.c
index 979df0266cf08c61bd1a2984707562dcfc331667..736839a0b0ed9a92995466a2e4938cd6b31837a8 100644 (file)
@@ -1,6 +1,6 @@
 /* Support routines for decoding "stabs" debugging information format.
 
-   Copyright (C) 1986-2019 Free Software Foundation, Inc.
+   Copyright (C) 1986-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -700,8 +700,8 @@ define_symbol (CORE_ADDR valu, const char *string, int desc, int type,
       SYMBOL_LINE (sym) = 0;   /* unknown */
     }
 
-  SYMBOL_SET_LANGUAGE (sym, get_current_subfile ()->language,
-                      &objfile->objfile_obstack);
+  sym->set_language (get_current_subfile ()->language,
+                    &objfile->objfile_obstack);
 
   if (is_cplus_marker (string[0]))
     {
@@ -740,7 +740,7 @@ define_symbol (CORE_ADDR valu, const char *string, int desc, int type,
     normal:
       std::string new_name;
 
-      if (SYMBOL_LANGUAGE (sym) == language_cplus)
+      if (sym->language () == language_cplus)
        {
          char *name = (char *) alloca (p - string + 1);
 
@@ -749,16 +749,12 @@ define_symbol (CORE_ADDR valu, const char *string, int desc, int type,
          new_name = cp_canonicalize_string (name);
        }
       if (!new_name.empty ())
-       {
-         SYMBOL_SET_NAMES (sym,
-                           new_name,
-                           1, objfile);
-       }
+       sym->compute_and_set_names (new_name, true, objfile->per_bfd);
       else
-       SYMBOL_SET_NAMES (sym, gdb::string_view (string, p - string), true,
-                         objfile);
+       sym->compute_and_set_names (gdb::string_view (string, p - string), true,
+                                   objfile->per_bfd);
 
-      if (SYMBOL_LANGUAGE (sym) == language_cplus)
+      if (sym->language () == language_cplus)
        cp_scan_for_anonymous_namespaces (get_buildsym_compunit (), sym,
                                          objfile);
 
@@ -1225,7 +1221,7 @@ define_symbol (CORE_ADDR valu, const char *string, int desc, int type,
          This is important to do, because of forward references:
          The cleanup of undefined types stored in undef_types only uses
          STRUCT_DOMAIN symbols to perform the replacement.  */
-      synonym = (SYMBOL_LANGUAGE (sym) == language_ada && p[-2] != 'T');
+      synonym = (sym->language () == language_ada && p[-2] != 'T');
 
       /* Typedef */
       SYMBOL_TYPE (sym) = read_type (&p, objfile);
@@ -3638,8 +3634,8 @@ read_enum_type (const char **pp, struct type *type,
 
       sym = allocate_symbol (objfile);
       sym->set_linkage_name (name);
-      SYMBOL_SET_LANGUAGE (sym, get_current_subfile ()->language,
-                          &objfile->objfile_obstack);
+      sym->set_language (get_current_subfile ()->language,
+                        &objfile->objfile_obstack);
       SYMBOL_ACLASS_INDEX (sym) = LOC_CONST;
       SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
       SYMBOL_VALUE (sym) = n;
@@ -4778,7 +4774,7 @@ find_name_end (const char *name)
 int
 hashname (const char *name)
 {
-  return hash (name, strlen (name)) % HASHSIZE;
+  return fast_hash (name, strlen (name)) % HASHSIZE;
 }
 
 /* Initializer for this module.  */
This page took 0.025033 seconds and 4 git commands to generate.