llvm-project/llvm/lib
Alexey Lapshin c187364d40 [Debuginfo][NFC] Create common error handlers for DWARFContext.
Summary:
this review is extracted from D74308.

It creates two error handlers which allow to redefine error
reporting routine and should be used for all places
where errors are reported:

  std::function<void(Error)> RecoverableErrorHandler = defaultErrorHandler;
  std::function<void(Error)> WarningHandler = defaultWarningHandler;

It also creates accessors to above handlers which should be used to
report errors.

  function_ref<void(Error)> getRecoverableErrorHandler() {
    return RecoverableErrorHandler;
  }

  function_ref<void(Error)> getWarningHandler() { return WarningHandler; }

It patches all error reporting places inside DWARFContext and DWARLinker.

Reviewers: jhenderson, dblaikie, probinson, aprantl, JDevlieghere

Reviewed By: jhenderson, JDevlieghere

Subscribers: hiraditya, llvm-commits

Tags: #llvm, #debug-info

Differential Revision: https://reviews.llvm.org/D74481
2020-02-15 12:46:17 +03:00
..
Analysis Reverting D73027 [DependenceAnalysis] Dependecies for loads marked with "ivnariant.load" should not be shared with general accesses(PR42151). 2020-02-14 22:57:23 +07:00
AsmParser Restore "[WPD/LowerTypeTests] Delay lowering/removal of type tests until after ICP" 2020-02-11 10:48:05 -08:00
BinaryFormat DWARFDebugLine.cpp: Format unknown line number standard opcodes 2020-01-15 10:45:50 -05:00
Bitcode Revert "Remove redundant "std::move"s in return statements" 2020-02-10 07:07:40 -08:00
Bitstream Revert "Remove redundant "std::move"s in return statements" 2020-02-10 07:07:40 -08:00
CodeGen [MCStreamer] De-capitalize EmitValue EmitIntValue{,InHex} 2020-02-14 23:08:40 -08:00
DWARFLinker [Debuginfo][NFC] Create common error handlers for DWARFContext. 2020-02-15 12:46:17 +03:00
DebugInfo [Debuginfo][NFC] Create common error handlers for DWARFContext. 2020-02-15 12:46:17 +03:00
Demangle Use std::foo_t rather than std::foo in LLVM. 2020-02-11 15:12:51 -08:00
ExecutionEngine [Support] On Windows, ensure hardware_concurrency() extends to all CPU sockets and all NUMA groups 2020-02-14 10:24:22 -05:00
Frontend [NFC] Revert unnecessary parts of b91c267380 2020-02-15 01:38:58 -06:00
FuzzMutate Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
Fuzzer
IR Reenable "Always import constants" after compile time fixes 2020-02-14 06:37:14 -08:00
IRReader
LTO [Support] On Windows, ensure hardware_concurrency() extends to all CPU sockets and all NUMA groups 2020-02-14 10:24:22 -05:00
LineEditor Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
Linker IR Linking: Support merging Warning+Max module metadata flags 2020-02-07 16:29:58 -08:00
MC [MCStreamer] De-capitalize EmitValue EmitIntValue{,InHex} 2020-02-14 23:08:40 -08:00
MCA Revert "Remove redundant "std::move"s in return statements" 2020-02-10 07:07:40 -08:00
Object [MC] De-capitalize another set of MCStreamer::Emit* functions 2020-02-14 19:26:52 -08:00
ObjectYAML Revert "Remove redundant "std::move"s in return statements" 2020-02-10 07:07:40 -08:00
Option Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
Passes Restore "[WPD/LowerTypeTests] Delay lowering/removal of type tests until after ICP" 2020-02-11 10:48:05 -08:00
ProfileData Revert "Remove redundant "std::move"s in return statements" 2020-02-10 07:07:40 -08:00
Remarks Revert "Remove redundant "std::move"s in return statements" 2020-02-10 07:07:40 -08:00
Support [Debuginfo][NFC] Create common error handlers for DWARFContext. 2020-02-15 12:46:17 +03:00
TableGen [llvm][TableGen] Define FieldInit::isConcrete overload 2020-02-10 18:04:58 -08:00
Target [MCStreamer] De-capitalize EmitValue EmitIntValue{,InHex} 2020-02-14 23:08:40 -08:00
Testing
TextAPI [llvm][TextAPI] add simulators to output 2020-02-11 10:37:37 -08:00
ToolDrivers [llvm] Replace SmallStr.str().str() with std::string conversion operator. 2020-01-29 21:16:46 -08:00
Transforms [Attributor] Collect memory accesses with their respective kind and location 2020-02-15 02:12:04 -06:00
WindowsManifest Revert "Temporarily revert "build: avoid hardcoding the libxml2 library name"" 2019-12-03 09:27:14 -08:00
XRay Use std::foo_t rather than std::foo in LLVM. 2020-02-11 15:12:51 -08:00
CMakeLists.txt [Dsymutil][Debuginfo][NFC] Reland: Refactor dsymutil to separate DWARF optimizing part. #2. 2020-01-08 14:15:31 +03:00
LLVMBuild.txt [Dsymutil][Debuginfo][NFC] Reland: Refactor dsymutil to separate DWARF optimizing part. #2. 2020-01-08 14:15:31 +03:00