[PATCH] D74308: [Debuginfo][NFC] Unify error reporting routines inside DebugInfoDWARF.

Alexey Lapshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 23 23:12:33 PST 2020


avl added a comment.

@jhenderson I did not clearly get what should be done for handlers for create function. How following should be changed?

  static ErrorPolicy objectFileErrorHandler(Error E);
  
  ErrorPolicy DWARFContext::objectFileErrorHandler(Error E) {
    WithColor::defaultErrorHandler(std::move(E));
    return ErrorPolicy::Continue;
  }
  ....
  create(const object::ObjectFile &Obj, const LoadedObjectInfo *L = nullptr,
           function_ref<ErrorPolicy(Error)> ObjectFileErrorHandler = objectFileErrorHandler,
           std::string DWPName = "",
           std::function<void(Error)> RecoverableErrorHandler = WithColor::defaultErrorHandler,
           std::function<void(Error)> WarningHandler = WithColor::defaultWarningHandler);
  
  .....
      Context = DWARFContext::create(*Objects.second, nullptr,
                                     DWARFContext::objectFileErrorHandler,
                                     Opts.DWPName);


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74308/new/

https://reviews.llvm.org/D74308





More information about the llvm-commits mailing list