[all-commits] [llvm/llvm-project] c18736: [Debuginfo][NFC] Create common error handlers for ...

avl-llvm via All-commits all-commits at lists.llvm.org
Sat Feb 15 01:46:22 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: c187364d406182d8970032b5ed2b2823f9500e97
      https://github.com/llvm/llvm-project/commit/c187364d406182d8970032b5ed2b2823f9500e97
  Author: Alexey Lapshin <a.v.lapshin at mail.ru>
  Date:   2020-02-15 (Sat, 15 Feb 2020)

  Changed paths:
    M llvm/include/llvm/DebugInfo/DIContext.h
    M llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
    M llvm/include/llvm/Support/WithColor.h
    M llvm/lib/DWARFLinker/DWARFLinker.cpp
    M llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
    M llvm/lib/Support/WithColor.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list