DWARF v5: fix directory index in the line table
authorFangrui Song <maskray@google.com>
Mon, 6 May 2019 08:03:46 +0000 (08:03 +0000)
committerFangrui Song <maskray@google.com>
Mon, 6 May 2019 08:03:46 +0000 (08:03 +0000)
commit7e55672b225640fa19f92e9ae73f53d0718b3ad6
treed9c03512d970075f4123b89b10b9fd175c58dee8
parent2a0cfcce6a272f64432d6eb18fa922e6f4631f77
DWARF v5: fix directory index in the line table

Summary:
Prior to DWARF v5, a directory index of 0 represents DW_AT_comp_dir.

In DWARF v5, the index starts with 0 and Entry.DirIdx is the index into
Prologue.IncludeDirectories.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D61253

llvm-svn: 360015
llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
llvm/test/DebugInfo/symbolize-directory.s [new file with mode: 0644]