[PATCH] D44560: [DWARF] Rework debug line parsing to use llvm::Error and callbacks

Rafael Avila de Espindola via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 19 14:52:06 PDT 2018


espindola added a comment.

One thing that I am probably missing is why we need this much.

On the lld side we only read this section when there is an error, and if reading it fails we just want to print the extra info to the user.

My guess is that something like lldb would be similar, read the line table and print a message if it failed.

For both cases a simple Expected<> should be sufficient, no?



================
Comment at: include/llvm/DebugInfo/DWARF/DWARFDebugLine.h:301
                           uint64_t Address) const;
-    Optional<StringRef> getSourceByIndex(uint64_t FileIndex,
-                                         DILineInfoSpecifier::FileLineInfoKind Kind) const;
+    Optional<StringRef>
+    getSourceByIndex(uint64_t FileIndex,
----------------
Why reformat this?


Repository:
  rL LLVM

https://reviews.llvm.org/D44560





More information about the llvm-commits mailing list