]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Use 'bool' more idiomatically in dwarf_decode_lines
authorTom Tromey <tom@tromey.com>
Sat, 3 Jul 2021 17:40:54 +0000 (11:40 -0600)
committerTom Tromey <tom@tromey.com>
Sat, 3 Jul 2021 17:40:54 +0000 (11:40 -0600)
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  <tom@tromey.com>

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

gdb/ChangeLog
gdb/dwarf2/read.c

index 6a5f8b569f827cf2fbe6d7708226110b7d47cc33..6a538f9eb863e243cc9bb9f129cf244a834f66ef 100644 (file)
@@ -1,3 +1,8 @@
+2021-07-03  Tom Tromey  <tom@tromey.com>
+
+       * dwarf2/read.c (lnp_state_machine::record_line): Use 'true'.
+       (dwarf_decode_lines): Remove '=='.
+
 2021-07-02  Tom Tromey  <tromey@adacore.com>
 
        * ada-exp.y (chop_selector, chop_separator, write_selectors)
index 760d4319c29697d16b7aa4890d7ed43b8cf44ebd..fe82175990e438c23b5f42f094095f19abf996fa 100644 (file)
@@ -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,
@@ -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 =