aboutsummaryrefslogtreecommitdiff
path: root/gdb/value.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-01-31 07:52:09 -0700
committerTom Tromey <tom@tromey.com>2023-02-13 15:21:06 -0700
commitd0c9791728caa0d3b3270a997c7fd97919976c97 (patch)
tree1753b7232efa89e05696d4289d60ad019fc161e4 /gdb/value.h
parent7cf57bc5be656c62cc6b80280a9eddad2b8ded3f (diff)
downloadbinutils-d0c9791728caa0d3b3270a997c7fd97919976c97.zip
binutils-d0c9791728caa0d3b3270a997c7fd97919976c97.tar.gz
binutils-d0c9791728caa0d3b3270a997c7fd97919976c97.tar.bz2
Turn value_type into method
This changes value_type to be a method of value. Much of this patch was written by script. Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/value.h')
-rw-r--r--gdb/value.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/gdb/value.h b/gdb/value.h
index 2c2d773..80c92c4 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -160,6 +160,11 @@ struct value
DISABLE_COPY_AND_ASSIGN (value);
+ /* Type of the value. */
+ struct type *type () const
+ { return m_type; }
+
+
/* Type of value; either not an lval, or one of the various
different possible kinds of lval. */
enum lval_type m_lval = not_lval;
@@ -337,10 +342,6 @@ struct value
ULONGEST m_limited_length = 0;
};
-/* Type of the value. */
-
-extern struct type *value_type (const struct value *);
-
/* Return the gdbarch associated with the value. */
extern struct gdbarch *get_value_arch (const struct value *value);