(lookup_global_symbol_from_objfile): Simplify.
authorDoug Evans <xdje42@gmail.com>
Thu, 11 Dec 2014 17:55:29 +0000 (09:55 -0800)
committerDoug Evans <xdje42@gmail.com>
Thu, 11 Dec 2014 17:55:29 +0000 (09:55 -0800)
gdb/ChangeLog:

* symtab.c (lookup_symbol_in_objfile_symtabs): Delete forward decl.
(symbol *lookup_symbol_via_quick_fns): Ditto.
(lookup_symbol_in_objfile): Add forward decl.
(lookup_global_symbol_from_objfile): Simplify, call
lookup_symbol_in_objfile.

gdb/ChangeLog
gdb/symtab.c

index e4e32ff1d46e5e561a57578e194dba97b8b8a20d..f5f80180fdb7380f34e05d9ad35df5fe0443df76 100644 (file)
@@ -1,3 +1,11 @@
+2014-12-11  Doug Evans  <xdje42@gmail.com>
+
+       * symtab.c (lookup_symbol_in_objfile_symtabs): Delete forward decl.
+       (symbol *lookup_symbol_via_quick_fns): Ditto.
+       (lookup_symbol_in_objfile): Add forward decl.
+       (lookup_global_symbol_from_objfile): Simplify, call
+       lookup_symbol_in_objfile.
+
 2014-12-11  Doug Evans  <xdje42@gmail.com>
 
        * symtab.c (domain_name) <MODULE_DOMAIN>: Add missing case.
index 483667da1b540406e0c075b5059449b6f754f24a..54e4be45782fdc51c95aacc85b7cfb0e25895abc 100644 (file)
@@ -80,15 +80,8 @@ struct symbol *lookup_local_symbol (const char *name,
                                    enum language language);
 
 static struct symbol *
-  lookup_symbol_in_objfile_symtabs (struct objfile *objfile,
-                                   int block_index, const char *name,
-                                   const domain_enum domain);
-
-static
-struct symbol *lookup_symbol_via_quick_fns (struct objfile *objfile,
-                                           int block_index,
-                                           const char *name,
-                                           const domain_enum domain);
+  lookup_symbol_in_objfile (struct objfile *objfile, int block_index,
+                           const char *name, const domain_enum domain);
 
 extern initialize_file_ftype _initialize_symtab;
 
@@ -1552,15 +1545,10 @@ lookup_global_symbol_from_objfile (struct objfile *main_objfile,
        objfile;
        objfile = objfile_separate_debug_iterate (main_objfile, objfile))
     {
-      struct symbol *sym;
-      
-      sym = lookup_symbol_in_objfile_symtabs (objfile, GLOBAL_BLOCK, name,
-                                             domain);
-      if (sym != NULL)
-       return sym;
+      struct symbol *sym = lookup_symbol_in_objfile (objfile, GLOBAL_BLOCK,
+                                                    name, domain);
 
-      sym = lookup_symbol_via_quick_fns (objfile, GLOBAL_BLOCK, name, domain);
-      if (sym)
+      if (sym != NULL)
        return sym;
     }