aboutsummaryrefslogtreecommitdiff
path: root/gas/dwarf2dbg.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2022-03-23 08:47:41 +0100
committerJan Beulich <jbeulich@suse.com>2022-03-23 08:47:41 +0100
commit47513fab28ef21fff8a6218ed3aade16605ed8b4 (patch)
tree60e12fab6fb02fa0c4cb0743be15c5da8e60edf7 /gas/dwarf2dbg.c
parent7992631e8c0b0e711fbaba991348ef6f6e583725 (diff)
downloadbinutils-47513fab28ef21fff8a6218ed3aade16605ed8b4.zip
binutils-47513fab28ef21fff8a6218ed3aade16605ed8b4.tar.gz
binutils-47513fab28ef21fff8a6218ed3aade16605ed8b4.tar.bz2
gas/Dwarf5: drop dead code
Commit 3417bfca676f ("GAS: DWARF-5: Ensure that the 0'th entry in the directory table contains the current... ") added a "dwarf_level < 5" check to out_dir_and_file_list(). This rendered dead that branch of the construct, due to the enclosing if()'s "DWARF2_LINE_VERSION >= 5". Delete that code as well as the corresponding part of the comment. While there also drop a redundant "dirs != NULL": "dirs" will always be non-NULL when dirs_in_use is not zero.
Diffstat (limited to 'gas/dwarf2dbg.c')
-rw-r--r--gas/dwarf2dbg.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/gas/dwarf2dbg.c b/gas/dwarf2dbg.c
index ba97b5f..c6778fe 100644
--- a/gas/dwarf2dbg.c
+++ b/gas/dwarf2dbg.c
@@ -2170,18 +2170,10 @@ out_dir_and_file_list (segT line_seg, int sizeof_offset)
line_str_seg->entsize = 1;
/* DWARF5 uses slot zero, but that is only set explicitly
- using a .file 0 directive. If that isn't used, but dir
- one is used, then use that as main file directory.
- Otherwise use pwd as main file directory. */
- if (dirs_in_use > 0 && dirs != NULL && dirs[0] != NULL)
+ using a .file 0 directive. Otherwise use pwd as main file
+ directory. */
+ if (dirs_in_use > 0 && dirs[0] != NULL)
dir = remap_debug_filename (dirs[0]);
- else if (dirs_in_use > 1
- && dirs != NULL
- && dirs[1] != NULL
- /* DWARF-5 directory tables expect dir[0] to be the same as
- DW_AT_comp_dir, which is the same as pwd. */
- && dwarf_level < 5)
- dir = remap_debug_filename (dirs[1]);
else
dir = remap_debug_filename (getpwd ());