[PATCH] D59515: [llvm] Prevent duplicate files in debug line header in dwarf 5.

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 22 14:23:11 PDT 2019


dblaikie added inline comments.


================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp:1034
+  else
+    return Prologue.FileNames[Index - 1];
 }
----------------
tamur wrote:
> dblaikie wrote:
> > Perhaps in v4 we could keep Index == array index, and leave FileNames[0] unused? (I guess then it might need a special case when being emitted to skip over FileNames[0]?)
> I'd prefer not to change dwarf4 behavior as much as possible, if that's ok with you?
Within this change, that makes sense - but if you have time to make this change as a separate patch, it'd be worth trying (to see if it's a good simplification, etc) as a follow-up to this.

LLVM's testing is pretty robust such that we can usually make changes like this (especially to existing functionality like DWARFv4 support that's been directly and indirectly tested by lots of test cases over the years) with pretty high confidence that if the tests pass, the change is OK & ideally the chaneg I suggesting wouldn't change the overall behavior, but be a refactoring/change in implementation only.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59515/new/

https://reviews.llvm.org/D59515





More information about the llvm-commits mailing list