diff options
author | James Henderson <jh7370@my.bristol.ac.uk> | 2019-12-20 14:30:31 +0000 |
---|---|---|
committer | James Henderson <jh7370@my.bristol.ac.uk> | 2020-01-02 18:01:54 +0000 |
commit | bd402fc3f3e832395b89dda4a9b8392c6b0dd6fa (patch) | |
tree | dd3af656ef3cc90e9b373fd0e123cad388f4ebb5 /llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp | |
parent | 546c72a78b34966a17d37218d3a676d9eccf17f2 (diff) | |
download | bcm5719-llvm-bd402fc3f3e832395b89dda4a9b8392c6b0dd6fa.tar.gz bcm5719-llvm-bd402fc3f3e832395b89dda4a9b8392c6b0dd6fa.zip |
[DebugInfo][NFC] Use function_ref consistently in debug line parsing
This patch fixes an inconsistency where we were using std::function in
some places and function_ref in others to pass around the error handling
callback.
Reviewed by: MaskRay
Differential Revision: https://reviews.llvm.org/D71762
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp index cf31f5e57a4..8892739d55f 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp @@ -514,7 +514,7 @@ DWARFDebugLine::getLineTable(uint64_t Offset) const { Expected<const DWARFDebugLine::LineTable *> DWARFDebugLine::getOrParseLineTable( DWARFDataExtractor &DebugLineData, uint64_t Offset, const DWARFContext &Ctx, - const DWARFUnit *U, std::function<void(Error)> RecoverableErrorCallback) { + const DWARFUnit *U, function_ref<void(Error)> RecoverableErrorCallback) { if (!DebugLineData.isValidOffset(Offset)) return createStringError(errc::invalid_argument, "offset 0x%8.8" PRIx64 " is not a valid debug line section offset", @@ -535,7 +535,7 @@ Expected<const DWARFDebugLine::LineTable *> DWARFDebugLine::getOrParseLineTable( Error DWARFDebugLine::LineTable::parse( DWARFDataExtractor &DebugLineData, uint64_t *OffsetPtr, const DWARFContext &Ctx, const DWARFUnit *U, - std::function<void(Error)> RecoverableErrorCallback, raw_ostream *OS) { + function_ref<void(Error)> RecoverableErrorCallback, raw_ostream *OS) { const uint64_t DebugLineOffset = *OffsetPtr; clear(); |