[PATCH] D46832: [ELF] Change arguments to match D46831
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 14 07:37:00 PDT 2018
jhenderson created this revision.
jhenderson added reviewers: ruiu, grimar.
Herald added subscribers: arichardson, emaste.
Herald added a reviewer: espindola.
A suggestion from @JDevlieghere means that we need to pass in a callback that takes an `Error` rather than a string into the `getLineTableForUnit`. This corresponds to https://reviews.llvm.org/D46831.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D46832
Files:
ELF/InputFiles.cpp
Index: ELF/InputFiles.cpp
===================================================================
--- ELF/InputFiles.cpp
+++ ELF/InputFiles.cpp
@@ -131,14 +131,17 @@
Config->Wordsize);
for (std::unique_ptr<DWARFCompileUnit> &CU : Dwarf->compile_units()) {
+ auto warnForError = [](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(), warnForError);
const DWARFDebugLine::LineTable *LT = nullptr;
if (ExpectedLT)
LT = *ExpectedLT;
else
- handleAllErrors(ExpectedLT.takeError(),
- [](ErrorInfoBase &Err) { warn(Err.message()); });
+ warnForError(ExpectedLT.takeError());
if (!LT)
continue;
LineTables.push_back(LT);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46832.146607.patch
Type: text/x-patch
Size: 962 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180514/0e9f9399/attachment.bin>
More information about the llvm-commits
mailing list