SuccessChanges

Summary

  1. [AMDGPU] Remove unused variable introduced in r251860 (details)
  2. [CMake][compiler-rt][libunwind] Compile assembly files as ASM not C, unify workarounds (details)
  3. [SyntaxTree][NFC] Append "get" to syntax Nodes accessor names (details)
  4. [SyntaxTree][NFC][Style] Functions start with lowercase (details)
  5. Fix Attributor return status (details)
  6. Fix OpenMP deduplicateRuntimeCalls return status (details)
  7. [lldb/Utility] Use APSInt in the Scalar class (details)
  8. [lldb/DWARF] Fix handling of variables with both location and const_value attributes (details)
Commit 45eeb8c2a937ee5179754d3d14e10e3425d2b538 by jay.foad
[AMDGPU] Remove unused variable introduced in r251860
The file was modifiedllvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp (diff)
Commit 45344cf7ac5b848f77825ffa37b0cb3b69b9b07b by raul
[CMake][compiler-rt][libunwind] Compile assembly files as ASM not C, unify workarounds

It isn't very wise to pass an assembly file to the compiler and tell it to compile as a C file and hope that the compiler recognizes it as assembly instead.
Simply don't mark the file as C and CMake will recognize the rest.

This was attempted earlier in https://reviews.llvm.org/D85706, but reverted due to architecture issues on Apple.
Subsequent digging revealed a similar change was done earlier for libunwind in https://reviews.llvm.org/rGb780df052dd2b246a760d00e00f7de9ebdab9d09.
Afterwards workarounds were added for MinGW and Apple:
* https://reviews.llvm.org/rGb780df052dd2b246a760d00e00f7de9ebdab9d09
* https://reviews.llvm.org/rGd4ded05ba851304b26a437896bc3962ef56f62cb

The workarounds in libunwind and compiler-rt are unified and comments added pointing to each other.
The workaround is updated to only be used for MinGW for CMake versions before 3.17, which fixed the issue (https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4287).

Additionally fixed Clang not being passed as the assembly compiler for compiler-rt runtime build.

Example error:
[525/634] Building C object lib/tsan/CMakeFiles/clang_rt.tsan-aarch64.dir/rtl/tsan_rtl_aarch64.S.o
FAILED: lib/tsan/CMakeFiles/clang_rt.tsan-aarch64.dir/rtl/tsan_rtl_aarch64.S.o
/opt/tooling/drive/host/bin/clang --target=aarch64-linux-gnu -I/opt/tooling/drive/llvm/compiler-rt/lib/tsan/.. -isystem /opt/tooling/drive/toolchain/opt/drive/toolchain/include -x c -Wall -Wno-unused-parameter -fno-lto -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -Wno-non-virtual-dtor -fPIE -fno-rtti -Wframe-larger-than=530 -Wglobal-constructors --sysroot=. -MD -MT lib/tsan/CMakeFiles/clang_rt.tsan-aarch64.dir/rtl/tsan_rtl_aarch64.S.o -MF lib/tsan/CMakeFiles/clang_rt.tsan-aarch64.dir/rtl/tsan_rtl_aarch64.S.o.d -o lib/tsan/CMakeFiles/clang_rt.tsan-aarch64.dir/rtl/tsan_rtl_aarch64.S.o -c /opt/tooling/drive/llvm/compiler-rt/lib/tsan/rtl/tsan_rtl_aarch64.S
/opt/tooling/drive/llvm/compiler-rt/lib/tsan/rtl/tsan_rtl_aarch64.S:29:1: error: expected identifier or '('
.section .text
^
1 error generated.

Differential Revision: https://reviews.llvm.org/D86308
The file was modifiedlibunwind/src/CMakeLists.txt (diff)
The file was modifiedclang/runtime/CMakeLists.txt (diff)
The file was modifiedcompiler-rt/cmake/Modules/AddCompilerRT.cmake (diff)
Commit fda3fa822cb6812c8db63f7cee4a8387e71e66ff by ecaldas
[SyntaxTree][NFC] Append "get" to syntax Nodes accessor names

Differential Revision: https://reviews.llvm.org/D86679
The file was modifiedclang/lib/Tooling/Syntax/Nodes.cpp (diff)
The file was modifiedclang/include/clang/Tooling/Syntax/Nodes.h (diff)
Commit ac87a0b5873cc14b23eeb25a0586b26cc5c2c33f by ecaldas
[SyntaxTree][NFC][Style] Functions start with lowercase

Differential Revision: https://reviews.llvm.org/D86682
The file was modifiedclang/lib/Tooling/Syntax/BuildTree.cpp (diff)
Commit 5621571fc7fc32ae936178e236664d88a3eaff79 by sguelton
Fix Attributor return status

Differential Revision: https://reviews.llvm.org/D86703
The file was modifiedllvm/lib/Transforms/IPO/Attributor.cpp (diff)
Commit 4e29d256694131cd8799b4aeccd1af42c3a2b7dd by sguelton
Fix OpenMP deduplicateRuntimeCalls return status

Differential Revision: https://reviews.llvm.org/D86705
The file was modifiedllvm/lib/Transforms/IPO/OpenMPOpt.cpp (diff)
Commit 219ccdfddecb963971ad14b5c14220b896d2c2e7 by pavel
[lldb/Utility] Use APSInt in the Scalar class

This enables us to further simplify some code because it no longer needs
to switch on the signedness of the type (APSInt handles that).
The file was modifiedlldb/unittests/Utility/ScalarTest.cpp (diff)
The file was modifiedlldb/source/Utility/Scalar.cpp (diff)
The file was modifiedlldb/include/lldb/Utility/Scalar.h (diff)
Commit 9f5927e42bf4a7448dc9dd3a1550d1126c595dad by pavel
[lldb/DWARF] Fix handling of variables with both location and const_value attributes

Class-level static constexpr variables can have both DW_AT_const_value
(in the "declaration") and a DW_AT_location (in the "definition")
attributes. Our code was trying to handle this, but it was brittle and
hard to follow (and broken) because it was processing the attributes in
the order in which they were found.

Refactor the code to make the intent clearer -- DW_AT_location trumps
DW_AT_const_value, and fix the bug which meant that we were not
displaying these variables properly (the culprit was the delayed parsing
of the const_value attribute due to a need to fetch the variable type.

Differential Revision: https://reviews.llvm.org/D86615
The file was addedlldb/test/Shell/SymbolFile/DWARF/DW_AT_location-DW_AT_const_value.s
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (diff)
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h (diff)