[binutils-gdb] Add missing includes to gdb_assert.h and gdb_string_view.h

Christian Biesinger cbiesinger@sourceware.org
Wed Oct 2 18:33:00 GMT 2019


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=700545387df82388b054947dc74cc0bb5cbd2a60

commit 700545387df82388b054947dc74cc0bb5cbd2a60
Author: Christian Biesinger <cbiesinger@google.com>
Date:   Tue Oct 1 13:36:07 2019 -0500

    Add missing includes to gdb_assert.h and gdb_string_view.h
    
    gdb::string_view uses gdb_assert, so it should include that header.
    And gdb_assert uses internal_error, so it should include errors.h.
    
    gdb/ChangeLog:
    
    2019-10-02  Christian Biesinger  <cbiesinger@google.com>
    
    	* gdbsupport/gdb_assert.h: Include errors.h.
    	* gdbsupport/gdb_string_view.h: Include gdb_assert.h.

Diff:
---
 gdb/ChangeLog                    | 5 +++++
 gdb/gdbsupport/gdb_assert.h      | 2 ++
 gdb/gdbsupport/gdb_string_view.h | 1 +
 3 files changed, 8 insertions(+)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index cb450e2..03c2498 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2019-10-02  Christian Biesinger  <cbiesinger@google.com>
+
+	* gdbsupport/gdb_assert.h: Include errors.h.
+	* gdbsupport/gdb_string_view.h: Include gdb_assert.h.
+
 2019-10-02  Tom Tromey  <tromey@adacore.com>
 
 	* NEWS: Add $_ada_exception entry.
diff --git a/gdb/gdbsupport/gdb_assert.h b/gdb/gdbsupport/gdb_assert.h
index a719d87..6113050 100644
--- a/gdb/gdbsupport/gdb_assert.h
+++ b/gdb/gdbsupport/gdb_assert.h
@@ -19,6 +19,8 @@
 #ifndef COMMON_GDB_ASSERT_H
 #define COMMON_GDB_ASSERT_H
 
+#include "errors.h"
+
 /* A static assertion.  This will cause a compile-time error if EXPR,
    which must be a compile-time constant, is false.  */
 
diff --git a/gdb/gdbsupport/gdb_string_view.h b/gdb/gdbsupport/gdb_string_view.h
index 68f7f7d..19ae222 100644
--- a/gdb/gdbsupport/gdb_string_view.h
+++ b/gdb/gdbsupport/gdb_string_view.h
@@ -46,6 +46,7 @@ namespace gdb {
 
 #include <string>
 #include <limits>
+#include "gdb_assert.h"
 
 namespace gdb {



More information about the Gdb-cvs mailing list