Remove unused includes in ada-*.c files
authorSimon Marchi <simon.marchi@polymtl.ca>
Tue, 29 Oct 2019 21:52:15 +0000 (17:52 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Tue, 29 Oct 2019 21:52:15 +0000 (17:52 -0400)
include-what-you-use reports:

../../../src/binutils-gdb/gdb/ada-lang.c should remove these lines:
- #include <sys/stat.h>  // lines 43-43
- #include <map>  // lines 66-66
- #include "c-lang.h"  // lines 33-33
- #include "demangle.h"  // lines 23-23
- #include "dictionary.h"  // lines 47-47
- #include "gdbsupport/gdb_vecs.h"  // lines 53-53
- #include "psymtab.h"  // lines 58-58

../../../src/binutils-gdb/gdb/ada-lang.c should remove these lines:
- #include <sys/stat.h>  // lines 43-43
- #include <map>  // lines 66-66
- #include "c-lang.h"  // lines 33-33
- #include "demangle.h"  // lines 23-23
- #include "dictionary.h"  // lines 47-47
- #include "gdbsupport/gdb_vecs.h"  // lines 53-53
- #include "psymtab.h"  // lines 58-58

../../../src/binutils-gdb/gdb/ada-valprint.c should remove these lines:
- #include "c-lang.h"  // lines 31-31
- #include "demangle.h"  // lines 26-26
- #include "infcall.h"  // lines 32-32
- #include "objfiles.h"  // lines 33-33
- #include "symtab.h"  // lines 22-22

Remove these includes.  Adding an include for gdbarch.h in
ada-valprint.c was necessary, because gdbarch_byte_order wouldn't be
found anymore.

gdb/ChangeLog:

* ada-lang.c: Remove includes.
* ada-typeprint.c: Remove includes.
* ada-valprint.c: Remove includes.

Change-Id: I07c2f2237ef0ed5fd9aa855d33711d780794fce2

gdb/ChangeLog
gdb/ada-lang.c
gdb/ada-typeprint.c
gdb/ada-valprint.c

index 3942b867a938fd0c2202502b6379c1aee2b5bf6b..63c8c57d69d573f7508e6e2d74ff8e4f99b4bff6 100644 (file)
@@ -1,3 +1,9 @@
+2019-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * ada-lang.c: Remove includes.
+       * ada-typeprint.c: Remove includes.
+       * ada-valprint.c: Remove includes.
+
 2019-10-29  Simon Marchi  <simon.marchi@efficios.com>
 
        * addrmap.c: Add static assertions of type size, moved from
index 5b549717a95d596bd6c7bd1765b289a4be8423ea..d08a2644d86464b743506a7c988d3ceb319fa66e 100644 (file)
@@ -20,7 +20,6 @@
 
 #include "defs.h"
 #include <ctype.h>
-#include "demangle.h"
 #include "gdb_regex.h"
 #include "frame.h"
 #include "symtab.h"
@@ -30,7 +29,6 @@
 #include "parser-defs.h"
 #include "language.h"
 #include "varobj.h"
-#include "c-lang.h"
 #include "inferior.h"
 #include "symfile.h"
 #include "objfiles.h"
 #include "gdb_obstack.h"
 #include "ada-lang.h"
 #include "completer.h"
-#include <sys/stat.h>
 #include "ui-out.h"
 #include "block.h"
 #include "infcall.h"
-#include "dictionary.h"
 #include "annotate.h"
 #include "valprint.h"
 #include "source.h"
 #include "observable.h"
 #include "stack.h"
-#include "gdbsupport/gdb_vecs.h"
 #include "typeprint.h"
 #include "namespace.h"
 #include "cli/cli-style.h"
 
-#include "psymtab.h"
 #include "value.h"
 #include "mi/mi-common.h"
 #include "arch-utils.h"
@@ -63,7 +57,6 @@
 #include "gdbsupport/function-view.h"
 #include "gdbsupport/byte-vector.h"
 #include <algorithm>
-#include <map>
 
 /* Define whether or not the C operator '/' truncates towards zero for
    differently signed operands (truncation direction is undefined in C).
index c2461660ad4aff9553b41fd1172d2e3e4ccfe42f..be379254aa1c4cb6bd2173db30d64b7ce8d24775 100644 (file)
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "gdb_obstack.h"
 #include "bfd.h"               /* Binary File Description */
-#include "symtab.h"
 #include "gdbtypes.h"
-#include "expression.h"
 #include "value.h"
-#include "gdbcore.h"
-#include "target.h"
-#include "command.h"
-#include "gdbcmd.h"
-#include "language.h"
-#include "demangle.h"
 #include "c-lang.h"
 #include "cli/cli-style.h"
 #include "typeprint.h"
index 714b6259ec0e6edd8b98b072aab26798aac387dd..5ab036571a3da2a6b8d05637a51a93d5af850d75 100644 (file)
 
 #include "defs.h"
 #include <ctype.h>
-#include "symtab.h"
 #include "gdbtypes.h"
 #include "expression.h"
 #include "value.h"
-#include "demangle.h"
 #include "valprint.h"
 #include "language.h"
 #include "annotate.h"
 #include "ada-lang.h"
-#include "c-lang.h"
-#include "infcall.h"
-#include "objfiles.h"
 #include "target-float.h"
 #include "cli/cli-style.h"
+#include "gdbarch.h"
 
 static int print_field_values (struct type *, const gdb_byte *,
                               int,