Modify dwarf_decl_file to support DW_AT_decl_file with value 0.
Because of inconsistencies in the DWARF 5 spec, it is ambiguous whether
DW_AT_decl_file value 0 is a valid .debug_line file table index for the
main source file or if it means that there is no source file specified.
dwarf_decl_file interprets DW_AT_decl_file 0 as meaning no source file
is specified. This works with DWARF 5 produced by gcc, which duplicates
the main source file name at index 0 and 1 of the file table and avoids
using DW_AT_decl_file 0.
However clang uses DW_AT_decl_file 0 for the main source index with no
duplication at another index. In this case dwarf_decl_file will be
unable to find the file name of the main file.
This patch changes dwarf_decl_file to treat DW_AT_decl_file 0 as a normal
index into the file table, allowing it to work with DWARF 5 debuginfo
produced by clang.
As for earlier DWARF versions which exclusively use DW_AT_decl_file 0
to indicate that no source file is specified, dwarf_decl_file will now
return the name "???" if called on a DIE with DW_AT_decl_file 0.