[all-commits] [llvm/llvm-project] 3d90a6: [llvm-readobj] - Remove Error.cpp, .h and drop depe...

Georgii Rymar via All-commits all-commits at lists.llvm.org
Tue Sep 1 06:46:50 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 3d90a61cf2edc22f1f006de351a1812592a7648b
      https://github.com/llvm/llvm-project/commit/3d90a61cf2edc22f1f006de351a1812592a7648b
  Author: Georgii Rymar <grimar at accesssoftek.com>
  Date:   2020-09-01 (Tue, 01 Sep 2020)

  Changed paths:
    M llvm/test/tools/llvm-readobj/archive.test
    M llvm/tools/llvm-readobj/ARMEHABIPrinter.h
    M llvm/tools/llvm-readobj/ARMWinEHPrinter.cpp
    M llvm/tools/llvm-readobj/CMakeLists.txt
    M llvm/tools/llvm-readobj/COFFDumper.cpp
    M llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h
    M llvm/tools/llvm-readobj/ELFDumper.cpp
    R llvm/tools/llvm-readobj/Error.cpp
    R llvm/tools/llvm-readobj/Error.h
    M llvm/tools/llvm-readobj/MachODumper.cpp
    M llvm/tools/llvm-readobj/ObjDumper.cpp
    M llvm/tools/llvm-readobj/WasmDumper.cpp
    M llvm/tools/llvm-readobj/Win64EHDumper.cpp
    M llvm/tools/llvm-readobj/WindowsResourceDumper.cpp
    M llvm/tools/llvm-readobj/XCOFFDumper.cpp
    M llvm/tools/llvm-readobj/llvm-readobj.cpp

  Log Message:
  -----------
  [llvm-readobj] - Remove Error.cpp,.h and drop dependencies in the code.

We have Error.cpp/.h which contains some code for working with error codes.
In fact we use Error/Expected<> almost everywhere already and we can get rid
of these files.

Note: a few places in the code used readobj specific error codes,
e.g. `return readobj_error::unknown_symbol`. But these codes are never really used,
i.e. the code checks the fact of a success/error call only.
So I've changes them to `return inconvertibleErrorCode()` for now.
It seems that these places probably should be converted to use `Error`/`Expected<>`.

Differential revision: https://reviews.llvm.org/D86772




More information about the All-commits mailing list