[all-commits] [llvm/llvm-project] bdc35b: [Object] Deduplicate the three createError functions

Raphael Isemann via All-commits all-commits at lists.llvm.org
Mon Oct 11 07:37:23 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bdc35b0efca9445950990fe642f18c3d82ab1299
      https://github.com/llvm/llvm-project/commit/bdc35b0efca9445950990fe642f18c3d82ab1299
  Author: Raphael Isemann <teemperor at gmail.com>
  Date:   2021-10-11 (Mon, 11 Oct 2021)

  Changed paths:
    M llvm/include/llvm/Object/ELF.h
    M llvm/include/llvm/Object/Error.h
    M llvm/lib/Object/COFFModuleDefinition.cpp
    M llvm/lib/Object/XCOFFObjectFile.cpp

  Log Message:
  -----------
  [Object] Deduplicate the three createError functions

The Object library currently has three identical functions that translate a
Twine into a parser error. Until recently these functions have coexisted
peacefully, but since D110320 Clang with enabled modules is now diagnosing that
we have several definitions of `createError` in Object.

This patch just merges them all and puts them into Object's `Error.h` where the
error code for `parse_failed` is also defined which seems cleaner and unbreaks
the bots.

Reviewed By: jhenderson

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




More information about the All-commits mailing list