aboutsummaryrefslogtreecommitdiff
path: root/gdb/value.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-01-31 13:41:35 -0700
committerTom Tromey <tom@tromey.com>2023-02-13 15:21:08 -0700
commitee7bb2944b75ce482dbf3bdb2d396efc98f1cf89 (patch)
treed5ffc773a34b580cd981ce5c529f8232c4e5a355 /gdb/value.h
parentb27556e3c10e197cc31021649a6113bb305b970e (diff)
downloadgdb-ee7bb2944b75ce482dbf3bdb2d396efc98f1cf89.zip
gdb-ee7bb2944b75ce482dbf3bdb2d396efc98f1cf89.tar.gz
gdb-ee7bb2944b75ce482dbf3bdb2d396efc98f1cf89.tar.bz2
Turn value_zero into static "constructor"
This turns value_zero into a static "constructor" of value. Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/value.h')
-rw-r--r--gdb/value.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/value.h b/gdb/value.h
index 4d5ef01..4213a55 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -178,6 +178,9 @@ public:
/* Allocate NOT_LVAL value for type TYPE being OPTIMIZED_OUT. */
static struct value *allocate_optimized_out (struct type *type);
+ /* Create a value of type TYPE that is zero, and return it. */
+ static struct value *zero (struct type *type, enum lval_type lv);
+
~value ();
DISABLE_COPY_AND_ASSIGN (value);
@@ -398,7 +401,7 @@ public:
used instead of read_memory to enable extra caching. */
unsigned int m_stack : 1;
- /* True if this is a zero value, created by 'value_zero'; false
+ /* True if this is a zero value, created by 'value::zero'; false
otherwise. */
bool m_is_zero : 1;
@@ -1159,8 +1162,6 @@ extern struct value *value_reinterpret_cast (struct type *type,
extern struct value *value_dynamic_cast (struct type *type, struct value *arg);
-extern struct value *value_zero (struct type *type, enum lval_type lv);
-
extern struct value *value_one (struct type *type);
extern struct value *value_repeat (struct value *arg1, int count);