[DWARF] Unify warning callbacks. NFC.
authorVictor Leschuk <vleschuk@accesssoftek.com>
Thu, 23 Aug 2018 12:43:33 +0000 (12:43 +0000)
committerVictor Leschuk <vleschuk@accesssoftek.com>
Thu, 23 Aug 2018 12:43:33 +0000 (12:43 +0000)
commitcf1f714d3b1bcb623dbeed33dc8c469f3af0bdf2
tree6ba226eb4e909e5728b5d833551bf898613e421b
parent516fcdac6dfcda1c374ef392bb3949c6bfc73734
[DWARF] Unify warning callbacks. NFC.

Both DWARFDebugLine and DWARFDebugAddr used the same callback mechanism
for handling recoverable errors. They both implemented similar warn() function
to be used as such callbacks.

In this revision we get rid of code duplication and move this warn() function
to DWARFContext as DWARFContext::dumpWarning().

Reviewers: lhames, jhenderson, aprantl, probinson, dblaikie, JDevlieghere

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D51033

llvm-svn: 340528
llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h
llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
llvm/tools/dsymutil/DwarfLinker.cpp