[PATCH] D46832: [ELF] Change arguments to match D46831

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 21 08:35:33 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL332846: [ELF] Update due to API change in .debug_line parsing (authored by jhenderson, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D46832?vs=146607&id=147791#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D46832

Files:
  lld/trunk/ELF/InputFiles.cpp


Index: lld/trunk/ELF/InputFiles.cpp
===================================================================
--- lld/trunk/ELF/InputFiles.cpp
+++ lld/trunk/ELF/InputFiles.cpp
@@ -131,14 +131,17 @@
                               Config->Wordsize);
 
   for (std::unique_ptr<DWARFCompileUnit> &CU : Dwarf->compile_units()) {
+    auto Report = [](Error Err) {
+      handleAllErrors(std::move(Err),
+                      [](ErrorInfoBase &Info) { warn(Info.message()); });
+    };
     Expected<const DWARFDebugLine::LineTable *> ExpectedLT =
-        Dwarf->getLineTableForUnit(CU.get(), warn);
+        Dwarf->getLineTableForUnit(CU.get(), Report);
     const DWARFDebugLine::LineTable *LT = nullptr;
     if (ExpectedLT)
       LT = *ExpectedLT;
     else
-      handleAllErrors(ExpectedLT.takeError(),
-                      [](ErrorInfoBase &Err) { warn(Err.message()); });
+      Report(ExpectedLT.takeError());
     if (!LT)
       continue;
     LineTables.push_back(LT);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46832.147791.patch
Type: text/x-patch
Size: 974 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180521/a3c3401c/attachment.bin>


More information about the llvm-commits mailing list