Skip to content

Commit

Permalink
Use 'bool' more idiomatically in dwarf_decode_lines
Browse files Browse the repository at this point in the history
I noticed a couple of spots related to dwarf_decode_lines where the
'include_p' field was not being used idiomatically -- it is of type
bool now, so treat it as such.

gdb/ChangeLog
2021-07-03  Tom Tromey  <[email protected]>

	* dwarf2/read.c (lnp_state_machine::record_line): Use 'true'.
	(dwarf_decode_lines): Remove '=='.
  • Loading branch information
tromey committed Jul 3, 2021
1 parent 4b51505 commit 4fabc3a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions gdb/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2021-07-03 Tom Tromey <[email protected]>

* dwarf2/read.c (lnp_state_machine::record_line): Use 'true'.
(dwarf_decode_lines): Remove '=='.

2021-07-02 Tom Tromey <[email protected]>

* ada-exp.y (chop_selector, chop_separator, write_selectors)
Expand Down
4 changes: 2 additions & 2 deletions gdb/dwarf2/read.c
Original file line number Diff line number Diff line change
Expand Up @@ -20997,7 +20997,7 @@ lnp_state_machine::record_line (bool end_sequence)
previous version of the code. */
else if (m_op_index == 0 || end_sequence)
{
fe->included_p = 1;
fe->included_p = true;
if (m_record_lines_p)
{
/* When we switch files we insert an end maker in the first file,
Expand Down Expand Up @@ -21368,7 +21368,7 @@ dwarf_decode_lines (struct line_header *lh, const char *comp_dir,
/* Now that we're done scanning the Line Header Program, we can
create the psymtab of each included file. */
for (auto &file_entry : lh->file_names ())
if (file_entry.included_p == 1)
if (file_entry.included_p)
{
gdb::unique_xmalloc_ptr<char> name_holder;
const char *include_name =
Expand Down

0 comments on commit 4fabc3a

Please sign in to comment.