SuccessChanges

Summary

  1. [lldb/DWARF] More DW_AT_const_value fixes (details)
  2. [obj2yaml] - Cleanup error reporting (remove Error.cpp/.h files) (details)
  3. Copy m_plan_is_for_signal_trap member. (details)
  4. [libunwind] Convert x86, x86_64, arm64 register restore functions to C calling convention and name mangling (details)
  5. [gn build] Port 357dc1ed125 (details)
  6. [RDA] Don't visit the BB of the instruction in getReachingUniqueMIDef (details)
  7. [llvm-readobj/elf][test] - Add testing for EM_* specific OS/ABI values. (details)
  8. [llvm-readobj][test] - Commit trivial.obj.elf-amdhsa-gfx803 binary back. (details)
Commit 82982304d7095891b10faacdbf9b4eb73e92a92f by pavel
[lldb/DWARF] More DW_AT_const_value fixes

This fixes several issues in handling of DW_AT_const_value attributes:
- the first is that the size of the data given by data forms does not
  need to match the size of the underlying variable. We already had the
  case to handle this for DW_FORM_(us)data -- this extends the handling
  to other data forms. The main reason this was not picked up is because
  clang uses leb forms in these cases while gcc prefers the fixed-size
  ones.
- The handling of DW_AT_strp form was completely broken -- we would end
  up using the pointer value as the result. I've reorganized this code
  so that it handles all string forms uniformly.
- In case of a completely bogus form we would crash due to
  strlen(nullptr).

Depends on D86311.

Differential Revision: https://reviews.llvm.org/D86348
The file was modifiedlldb/test/Shell/SymbolFile/DWARF/DW_AT_const_value.s (diff)
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (diff)
The file was addedlldb/test/Shell/SymbolFile/DWARF/DW_AT_const_value-bitfields.s
Commit 357dc1ed125e4bf55f1e99fb141fc054c285edbf by grimar
[obj2yaml] - Cleanup error reporting (remove Error.cpp/.h files)

This removes Error.cpp/.h files from obj2yaml.
These files are not needed because we are
using `Error`s instead of error codes widely and do
not need a logic related to obj2yaml specific
error codes anymore.

I had to adjust just a few lines of tool's code
to remove remaining dependencies.

Differential revision: https://reviews.llvm.org/D86536
The file was removedllvm/tools/obj2yaml/Error.cpp
The file was modifiedllvm/tools/obj2yaml/CMakeLists.txt (diff)
The file was modifiedllvm/tools/obj2yaml/obj2yaml.cpp (diff)
The file was modifiedllvm/tools/obj2yaml/minidump2yaml.cpp (diff)
The file was removedllvm/tools/obj2yaml/Error.h
The file was modifiedllvm/tools/obj2yaml/elf2yaml.cpp (diff)
The file was modifiedllvm/tools/obj2yaml/dwarf2yaml.cpp (diff)
The file was modifiedllvm/tools/obj2yaml/macho2yaml.cpp (diff)
Commit 642cb7865f35ad7dbac78d716fcddaff561e8639 by benny.kra
Copy m_plan_is_for_signal_trap member.

Otherwise it would stay uninitialized. Found by msan.
The file was modifiedlldb/include/lldb/Symbol/UnwindPlan.h (diff)
Commit e524daa7e8719f4b43e6ebcf25fd4e7d74c5d1c4 by martin
[libunwind] Convert x86, x86_64, arm64 register restore functions to C calling convention and name mangling

Currently, the assembly functions for restoring register state have
been direct implementations of the Registers_*::jumpto() method
(contrary to the functions for saving register state, which are
implementations of the extern C function __unw_getcontext). This has
included having the assembly function name match the C++ mangling of
that method name (and having the function match the C++ member
function calling convention). To simplify the interface of the assembly
implementations, make the functions have C calling conventions and
name mangling.

This fixes building the library in with a MSVC C++ ABI with clang-cl,
which uses a significantly different method name mangling scheme.
(The library might not be of much use as C++ exception unwinder in such
an environment, but the libunwind.h interface for stepwise unwinding
still is usable, as is the _Unwind_Backtrace function.)

Differential Revision: https://reviews.llvm.org/D86041
The file was modifiedlibunwind/src/UnwindRegistersRestore.S (diff)
The file was modifiedlibunwind/src/Registers.hpp (diff)
Commit fc13d3d50e60e67b485720d5b2d049e8699249cc by llvmgnsyncbot
[gn build] Port 357dc1ed125
The file was modifiedllvm/utils/gn/secondary/llvm/tools/obj2yaml/BUILD.gn (diff)
Commit 85dd852a0d46684883fe3b4b19e780ba5d915b06 by samuel.tebbs
[RDA] Don't visit the BB of the instruction in getReachingUniqueMIDef

If the basic block of the instruction passed to getUniqueReachingMIDef
is a transitive predecessor of itself and has a definition of the
register, the function will return that definition even if it is after
the instruction given to the function. This patch stops the function
from scanning the instruction's basic block to prevent this.

Differential Revision: https://reviews.llvm.org/D86607
The file was modifiedllvm/lib/CodeGen/ReachingDefAnalysis.cpp (diff)
Commit cbedbd12e9837e049f0a936636a82ff39b75692b by grimar
[llvm-readobj/elf][test] - Add testing for EM_* specific OS/ABI values.

We have no tests for OS/ABI values specific to
EM_TI_C6000, ELFOSABI_AMDGPU_MESA3D and ELFOSABI_ARM machines.

Also, related arrays in the code are not grouped together.
(That is why such testing was missed I guess).

The patch fixes that all.

Differential revision: https://reviews.llvm.org/D86341
The file was removedllvm/test/tools/llvm-readobj/ELF/Inputs/trivial.obj.elf-amdhsa-gfx803
The file was modifiedllvm/test/tools/llvm-readobj/ELF/file-header-os-abi.test (diff)
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp (diff)
Commit 4b5460762a9634ba6a96b9589e11a1f7a9beaa3f by grimar
[llvm-readobj][test] - Commit trivial.obj.elf-amdhsa-gfx803 binary back.

It was removed in rGcbedbd12e9837e049f0a936636a82ff39b75692b by mistake.
The file was addedllvm/test/tools/llvm-readobj/ELF/Inputs/trivial.obj.elf-amdhsa-gfx803