Skip to content
Commit 08b91f59 authored by Tom de Vries's avatar Tom de Vries Committed by Tom Tromey
Browse files

[gdb/symtab] Refactor condition in scan_attributes

In scan_attributes there's code:
...
	  if (new_reader->cu == reader->cu
	      && new_info_ptr > watermark_ptr
	      && *parent_entry == nullptr)
	    ...
	  else if (*parent_entry == nullptr)
	    ...
...
that uses the "*parent_entry == nullptr" condition twice.

Make this somewhat more readable by factoring out the condition:
...
	  if (*parent_entry == nullptr)
	    {
	      if (new_reader->cu == reader->cu
		  && new_info_ptr > watermark_ptr)
		...
	      else
		...
	    }
...

This also allows us to factor out "form_addr (origin_offset, origin_is_dwz)".

Tested on x86_64-linux.

parent b6fc1940
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment