1. [unittests/Object] - Add testing for missing ELF formats. (details)
  2. [llvm-readobj][test] - Test "Format" values. (details)
  3. [llvm-readobj] - Simplify the code that creates dumpers. NFCI. (details)
  4. [BuildLibCalls] Add argmemonly to more lib calls. (details)
Commit c78d2766fd2c253f149a7b25498273d7f934873c by grimar
[unittests/Object] - Add testing for missing ELF formats.

This adds all missing format values that are defined in

Differential revision:
The file was modifiedllvm/unittests/Object/ELFObjectFileTest.cpp (diff)
Commit 4cd14256b23a19f4e7cf96628dda6cd6cec01be7 by grimar
[llvm-readobj][test] - Test "Format" values.

This adds testing for the "Format" field printed with `--file-headers`.

llvm-readelf doesn't use them, so only llvm-readobj needs to be tested.

All possible values are defined and tested in `ELFObjectFile<ELFT>::getFileFormatName()`.
Here we test just a few arbitrary ones.

Differential revision:
The file was addedllvm/test/tools/llvm-readobj/ELF/file-header-format.test
Commit 3fe01f0e215b7a41481806698efa087be6fe8897 by grimar
[llvm-readobj] - Simplify the code that creates dumpers. NFCI.

We have a few helper functions like the following:
std::error_code create*Dumper(...)

In fact we do not need or want to use `std::error_code` and the code
can be simpler if we just return `std::unique_ptr<ObjDumper>`.

This patch does this change and refines the signature of `createDumper`
as well.

Differential revision:
The file was modifiedllvm/tools/llvm-readobj/COFFDumper.cpp (diff)
The file was modifiedllvm/tools/llvm-readobj/ObjDumper.h (diff)
The file was modifiedllvm/tools/llvm-readobj/llvm-readobj.cpp (diff)
The file was modifiedllvm/tools/llvm-readobj/XCOFFDumper.cpp (diff)
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp (diff)
The file was modifiedllvm/tools/llvm-readobj/WasmDumper.cpp (diff)
The file was modifiedllvm/tools/llvm-readobj/MachODumper.cpp (diff)
Commit 20e989e9de6abcf9a684978a2688acc4ea01036f by flo
[BuildLibCalls] Add argmemonly to more lib calls.

strspn, strncmp, strcspn, strcasecmp, strncasecmp, memcmp, memchr,
memrchr, memcpy, memmove, memcpy, mempcpy, strchr, strrchr, bcmp
should all only access memory through their arguments.

I broke out strcoll, strcasecmp, strncasecmp because the result
depends on the locale, which might get accessed through memory.

Reviewed By: jdoerfert

Differential Revision:
The file was modifiedllvm/lib/Transforms/Utils/BuildLibCalls.cpp (diff)
The file was modifiedllvm/test/Transforms/InferFunctionAttrs/annotate.ll (diff)