summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Henderson <jh7370@my.bristol.ac.uk>2018-05-21 15:31:23 +0000
committerJames Henderson <jh7370@my.bristol.ac.uk>2018-05-21 15:31:23 +0000
commit1a7aaf3cd50422797a45910e76aa197975a1e1ed (patch)
tree2e087a620726e8bdecddbfe3c98672e2154da020
parent004b729ed1487057295df1e9b13456201dad244c (diff)
downloadbcm5719-llvm-1a7aaf3cd50422797a45910e76aa197975a1e1ed.tar.gz
bcm5719-llvm-1a7aaf3cd50422797a45910e76aa197975a1e1ed.zip
[ELF] Update due to API change in .debug_line parsing
See r332845. Reviewed by: grimar Differential Revision: https://reviews.llvm.org/D46832 llvm-svn: 332846
-rw-r--r--lld/ELF/InputFiles.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp
index 7b8d1f5cbed..fb596d31e2b 100644
--- a/lld/ELF/InputFiles.cpp
+++ b/lld/ELF/InputFiles.cpp
@@ -131,14 +131,17 @@ template <class ELFT> void ObjFile<ELFT>::initializeDwarf() {
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);
OpenPOWER on IntegriCloud