[PATCH] D44388: [ELF] Rework debug line parsing to use llvm::Error (LLD-side)

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 15 03:39:11 PDT 2018


jhenderson added inline comments.


================
Comment at: ELF/InputFiles.cpp:127
   // CU (object file), so offset is always 0.
-  const DWARFDebugLine::LineTable *LT =
-      DwarfLine->getOrParseLineTable(LineData, 0, Dwarf, nullptr);
+  auto LTOrErr = DwarfLine->getOrParseLineTable(LineData, 0, Dwarf, nullptr);
+  const DWARFDebugLine::LineTable *LT = LTOrErr.Table;
----------------
ruiu wrote:
> I agree with David; LTOrError is a confusing variable name.
> 
> Can you avoid using `auto` here?
It's also wrong, since it could be a LineTable and an Error! I'll fix that shortly (note: this may undergo some changes, as there's some discussion on the main review about the appropriate way of reporting the different levels of error).


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D44388





More information about the llvm-commits mailing list