Changes from Git (git http://labmaster3.local/git/llvm-project.git)


  1. [Orc] Add setters for target options and features to (details)
  2. [ExecutionEngine] Add a jitTargetAddressToFunction utility function. (details)
  3. [ORC] Add a runAsMain utility function to ExecutionUtils. (details)
  4. [llvm-readelf/llvm-readobj] - Check the version of SHT_GNU_verneed (details)
Commit 5c05b4a279f51d7eaa91f008bc5dc2155d98061a by Lang Hames
[Orc] Add setters for target options and features to
Also remove redundant feature initialization steps from the detectHost
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/JITTargetMachineBuilder.h
The file was modifiedllvm/lib/ExecutionEngine/Orc/JITTargetMachineBuilder.cpp
Commit 0e7ecc651a47f818abafdfe5f928923f789fe0bc by Lang Hames
[ExecutionEngine] Add a jitTargetAddressToFunction utility function.
jitTargetAddressToFunction takes a JITTargetAddress and returns a
pointer of the given function pointer type suitable for calling to
invoke the function at the target address.
jitTargetAddressToFunction currently behaves the same as
jitTargetAddressToPointer, but in the near future will be updated to
perform pointer signing on architectures that require it (e.g. arm64e).
For this reason it should always be preferred when generating callable
pointers for JIT'd functions.
The file was modifiedllvm/include/llvm/ExecutionEngine/JITSymbol.h
Commit ece8fed609061638bc867ecb74e179cb86426d60 by Lang Hames
[ORC] Add a runAsMain utility function to ExecutionUtils.
The runAsMain function takes a pointer to a function with a standard C
main signature, int(*)(int, char*[]), and invokes it using the given
arguments and program name. The arguments are copied into writable
temporary storage as required by the C and C++ specifications, so
runAsMain safe to use when calling main functions that modify their
arguments in-place.
This patch also uses the new runAsMain function to replace hand-rolled
versions in lli, llvm-jitlink, and the SpeculativeJIT example.
The file was modifiedllvm/tools/llvm-jitlink/llvm-jitlink.cpp
The file was modifiedllvm/examples/SpeculativeJIT/SpeculativeJIT.cpp
The file was modifiedllvm/tools/lli/lli.cpp
The file was modifiedllvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/ExecutionUtils.h
Commit 7eecf2b872e506927f59b6a1f4a8546d8baaa700 by grimar
[llvm-readelf/llvm-readobj] - Check the version of SHT_GNU_verneed
section entries.
It is a follow-up for D70826 and it is similar to D70810.
SHT_GNU_verneed contains the following fields:
`vn_version`: Version of structure. This value is currently set to 1,
and will be reset if the versioning implementation is incompatibly
We should check it for correctness.
Differential revision:
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
The file was modifiedllvm/test/tools/llvm-readobj/elf-verneed-invalid.test