[PATCH] D74773: [LLD][Debuginfo][NFC] create DWARFContext only once for the same object file.
Alexey Lapshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 18 07:48:39 PST 2020
avl created this revision.
avl added reviewers: ruiu, grimar, dblaikie, JDevlieghere.
Herald added subscribers: arphaman, arichardson, aprantl, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.
avl added a project: debug-info.
LLD already has a mechanism for caching creation of DWARCContext:
llvm::call_once(initDwarfLine, [this]() { initializeDwarf(); });
Though it is not used in all places.
I need that patch for implementing "Remove obsolete debug info" feature
(D74169 <https://reviews.llvm.org/D74169>). But this caching mechanism is useful by itself, and I think it
would be good to use it without connection to "Remove obsolete debug info"
feature. So this patch changes inplace creation of DWARFContext with
its cached version.
Additionally, that patch makes that RecoverableErrors would not be fatal
errors. i.e., If some RecoverableErrors occurred while parsing Debug Info,
LLD would still return 0.
Depends on D74308 <https://reviews.llvm.org/D74308>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D74773
Files:
lld/Common/ErrorHandler.cpp
lld/ELF/InputFiles.cpp
lld/ELF/InputFiles.h
lld/ELF/SyntheticSections.cpp
lld/include/lld/Common/DWARF.h
lld/include/lld/Common/ErrorHandler.h
lld/test/ELF/gdb-index-parse-fail.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74773.245165.patch
Type: text/x-patch
Size: 6829 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200218/60a9d77f/attachment.bin>
More information about the llvm-commits
mailing list