diff options
author | Tom Tromey <tom@tromey.com> | 2021-08-26 18:17:40 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2021-09-24 11:58:04 -0600 |
commit | 7ebaa5f7821682c40e79ee1fdfe43528b7d87376 (patch) | |
tree | e32d94cab5616bedf19aa1637eaea7e1c0df49fb /gdb/opencl-lang.c | |
parent | 604386598d43e50f183aba65189354e04ffbdda3 (diff) | |
download | fsf-binutils-gdb-7ebaa5f7821682c40e79ee1fdfe43528b7d87376.zip fsf-binutils-gdb-7ebaa5f7821682c40e79ee1fdfe43528b7d87376.tar.gz fsf-binutils-gdb-7ebaa5f7821682c40e79ee1fdfe43528b7d87376.tar.bz2 |
Move value_true to value.h
I noticed that value_true is declared in language.h and defined in
language.c. However, as part of the value API, I think it would be
better in one of those files. And, because it is very short, I
changed it to be an inline function in value.h. I've also removed a
comment from the implementation, on the basis that it seems obsolete
-- if the change it suggests was needed, it probably would have been
done by now; and if it is needed in the future, odds are it would be
done differently anyway.
Finally, this patch also changes value_true and value_logical_not to
return a bool, and updates some uses.
Diffstat (limited to 'gdb/opencl-lang.c')
-rw-r--r-- | gdb/opencl-lang.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/opencl-lang.c b/gdb/opencl-lang.c index 136969e..b877de4 100644 --- a/gdb/opencl-lang.c +++ b/gdb/opencl-lang.c @@ -748,7 +748,7 @@ opencl_logical_binop_operation::evaluate (struct type *expect_type, /* For scalar built-in types, only evaluate the right hand operand if the left hand operand compares unequal(&&)/equal(||) to 0. */ - int tmp = value_logical_not (arg1); + bool tmp = value_logical_not (arg1); if (op == BINOP_LOGICAL_OR) tmp = !tmp; |