Move declaration of overload_resolution to value.h

Message ID 20190919044248.47444-1-cbiesinger@google.com
State New, archived
Headers

Commit Message

Terekhov, Mikhail via Gdb-patches Sept. 19, 2019, 4:42 a.m. UTC
  The variable is defined in valops.c and has an extern decl in
eval.c; move it to the header file.

gdb/ChangeLog:

2019-09-19  Christian Biesinger  <cbiesinger@google.com>

	* eval.c: Move declaration of overload_resolution to...
	* value.h: ...here.
---
 gdb/eval.c  | 3 ---
 gdb/value.h | 2 ++
 2 files changed, 2 insertions(+), 3 deletions(-)
  

Comments

Simon Marchi Sept. 19, 2019, 11:05 a.m. UTC | #1
On 2019-09-19 12:42 a.m., Christian Biesinger via gdb-patches wrote:
> The variable is defined in valops.c and has an extern decl in
> eval.c; move it to the header file.

LGTM, thanks for doing these changes.

Simon
  
Terekhov, Mikhail via Gdb-patches Sept. 20, 2019, 12:19 a.m. UTC | #2
On Thu, Sep 19, 2019 at 8:05 PM Simon Marchi <simark@simark.ca> wrote:
>
> On 2019-09-19 12:42 a.m., Christian Biesinger via gdb-patches wrote:
> > The variable is defined in valops.c and has an extern decl in
> > eval.c; move it to the header file.
>
> LGTM, thanks for doing these changes.

Thanks, pushed.

To ssh://sourceware.org/git/binutils-gdb.git
   c7ae7675cf7..e4153ae630f  HEAD -> master

Christian
  

Patch

diff --git a/gdb/eval.c b/gdb/eval.c
index f8915b99578..70ba1f1e3fc 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -42,9 +42,6 @@ 
 #include "typeprint.h"
 #include <ctype.h>
 
-/* This is defined in valops.c */
-extern bool overload_resolution;
-
 /* Prototypes for local functions.  */
 
 static struct value *evaluate_subexp_for_sizeof (struct expression *, int *,
diff --git a/gdb/value.h b/gdb/value.h
index 47bf672eb5d..0d75eaa5b21 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -81,6 +81,8 @@  struct value_print_options;
   value_contents_eq for more info.
 */
 
+extern bool overload_resolution;
+
 /* The structure which defines the type of a value.  It should never
    be possible for a program lval value to survive over a call to the
    inferior (i.e. to be put into the history list or an internal