Changes

Summary

  1. DebugInfo: Add support for template parameters with qualifiers (details)
  2. DebugInfo: Add support for template parameters with reference qualifiers (details)
  3. Fixup some formatting from a recent commit (details)
  4. [WebAssembly] Fix a typo in comments (details)
  5. Check supported architectures in sseXYZ/avxXYZ headers (details)
  6. [runtimes] Initialize LLVM_DEFAULT_TARGET_TRIPLE if not set by the caller (details)
  7. [runtimes] Calculate the path to the llvm directory without the LLVM cmake package (details)
  8. [llvm-readobj] [COFF] Try to resolve symbols in unwind info on x86 (details)
  9. [llvm-readobj] [COFF] Resolve relocations pointing at section symbols for arm64 too (details)
  10. [Win64EH] Write .pdata symbol relocations relative to the temporary begin symbol (details)
  11. [AArch64] NFC: Use 'asm' in SIMDScalarCPY (details)
  12. [WebAssembly] NFC: Remove unused tblgen template args (details)
  13. [OpenCL] Tests C++ for OpenCL version macros (details)
  14. AArch64: fix indentation of ProcAppleA14. NFC. (details)
  15. [clang] disable implicit moves when not in CPlusPLus (details)
  16. [libc][Obvious] Some clean work with memmove. (details)
  17. [MLIR] Improve op parse error message for AtLeastNOperands trait (details)
Commit db4ff98bf9733605c713e75ab6677523e6d267cb by dblaikie
DebugInfo: Add support for template parameters with qualifiers

eg: t1<void () const> - DWARF doesn't have a particularly nice way to
encode this, for real member function types (like `void (t1::*)()
const`) the const-ness is encoded in the type of the artificial first
parameter. But `void () const` has no parameters, so encode it like a
normal const-qualified type, using DW_TAG_const_type. (similarly for
restrict and volatile)

Reference qualifiers (& and &&) coming in a separate commit shortly.
The file was modifiedclang/lib/CodeGen/CGDebugInfo.cpp
The file was modifiedclang/lib/CodeGen/CGDebugInfo.h
The file was modifiedclang/test/CodeGenCXX/debug-info-template.cpp
Commit e4b9f5e851d1fe0ba93cbb11b2ed4558602c379e by dblaikie
DebugInfo: Add support for template parameters with reference qualifiers

Followon from the previous commit supporting cvr qualifiers.
The file was modifiedclang/lib/CodeGen/CGDebugInfo.cpp
The file was modifiedclang/test/CodeGenCXX/debug-info-template.cpp
Commit 13e34f9fc13fbe08af69b206eacac2e0008dd126 by dblaikie
Fixup some formatting from a recent commit
The file was modifiedclang/lib/CodeGen/CGDebugInfo.cpp
Commit e85ed4437307afd2d79af5f9778fd98ce5cc036b by aheejin
[WebAssembly] Fix a typo in comments
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
Commit 9aeecdfa8e9104392b435444a5f978d2eb71e51a by sguelton
Check supported architectures in sseXYZ/avxXYZ headers

It doesn't make sense to include those headers on the wrong architecture,
provide an explicit error message in that case.

Fix https://bugs.llvm.org/show_bug.cgi?id=48915

Differential Revision: https://reviews.llvm.org/D109686
The file was modifiedclang/lib/Headers/nmmintrin.h
The file was modifiedclang/lib/Headers/emmintrin.h
The file was modifiedclang/lib/Headers/mmintrin.h
The file was modifiedclang/lib/Headers/tmmintrin.h
The file was modifiedclang/lib/Headers/immintrin.h
The file was modifiedclang/lib/Headers/xmmintrin.h
The file was addedclang/test/Headers/xmmintrin-unsupported.c
The file was modifiedclang/lib/Headers/ammintrin.h
The file was modifiedclang/lib/Headers/smmintrin.h
The file was modifiedclang/lib/Headers/pmmintrin.h
The file was modifiedclang/lib/Headers/wmmintrin.h
Commit 61f22f70caf80a44d2528e82e5511d5413b8cf70 by martin
[runtimes] Initialize LLVM_DEFAULT_TARGET_TRIPLE if not set by the caller

Differential Revision: https://reviews.llvm.org/D109716
The file was modifiedruntimes/CMakeLists.txt
Commit 5b007f2c94667b360fcf2009952cd227945ab9e5 by martin
[runtimes] Calculate the path to the llvm directory without the LLVM cmake package

If building by pointing cmake directly at the llvm-project/runtimes
directory, the llvm cmake package files (that provide e.g.
LLVM_BUILD_MAIN_SRC_DIR) aren't necessarily available. Instead just
use a path relative to the current source dir.

Differential Revision: https://reviews.llvm.org/D109717
The file was modifiedruntimes/CMakeLists.txt
Commit 197084fcee268fa7fbbc96df0900785766f55a69 by martin
[llvm-readobj] [COFF] Try to resolve symbols in unwind info on x86

This is the same as we do on arm64 already for the MSVC style label
symbols, but also handle the way GCC produces it - with all relocations
pointing at the .text section symbol, with various offsets.

Differential Revision: https://reviews.llvm.org/D109649
The file was addedllvm/test/tools/llvm-readobj/COFF/x86_64-unwind-preferred-symbol-gcc.yaml
The file was modifiedllvm/tools/llvm-readobj/Win64EHDumper.cpp
The file was addedllvm/test/tools/llvm-readobj/COFF/x86_64-unwind-preferred-symbol-msvc.yaml
Commit 63784b9a75eb959a65c8cf644af9565764d8322c by martin
[llvm-readobj] [COFF] Resolve relocations pointing at section symbols for arm64 too

This syncs parts from the x86 implementation to the ARMWinEH
implementation.

Currently, neither of the compilers targeting COFF/arm64 (MSVC, LLVM)
produce such relocations, but LLVM might after a later patch.

Differential Revision: https://reviews.llvm.org/D109650
The file was modifiedllvm/tools/llvm-readobj/ARMWinEHPrinter.h
The file was modifiedllvm/tools/llvm-readobj/ARMWinEHPrinter.cpp
The file was addedllvm/test/tools/llvm-readobj/COFF/arm64-unwind-preferred-symbol2.yaml
Commit ac3edc4c97ae9de62cdaec5d1acfa627a9a4b6ca by martin
[Win64EH] Write .pdata symbol relocations relative to the temporary begin symbol

Previously the relocations pointed at the public user facing,
possibly external symbol.

When the function itself is weak, that symbol may be overridden at
link time, pointing at another strong implementation of the same
function instead. In that case, there's two conflicting pdata entries
pointing at the same address, and the wrong unwind info might end up
used.

Both GCC/binutils and MSVC produce pdata pointing at internal static
symbols. (GCC/binutils point at the .text section just as LLVM does
after this change, MSVC points at special label type symbols with the
type IMAGE_SYM_CLASS_LABEL and names like '$LN4'.)

This fixes unwinding through an overridden "operator new" with a
statically linked C++ library in MinGW mode. (Building libc++ with
-ffunction-sections and linking with --gc-sections might avoid the
issue too.)

This makes the produced object files a little less user friendly
to debug, but with other recent improvements for llvm-readobj, the
unwind info debugging experience should be pretty much the same.

Differential Revision: https://reviews.llvm.org/D109651
The file was modifiedllvm/test/MC/COFF/seh-align2.s
The file was modifiedllvm/test/MC/COFF/seh-align3.s
The file was modifiedllvm/test/MC/COFF/seh.s
The file was modifiedllvm/lib/MC/MCWin64EH.cpp
The file was modifiedllvm/test/MC/AArch64/seh.s
The file was modifiedllvm/test/MC/COFF/seh-align1.s
Commit 742cf3996ed93fcafadf20bedf0a7789484ff8ef by cullen.rhodes
[AArch64] NFC: Use 'asm' in SIMDScalarCPY

Fixes a warning identified in D109359. The mnemonic is also mov, not
cpy.

Reviewed By: dmgreen

Differential Revision: https://reviews.llvm.org/D109573
The file was modifiedllvm/lib/Target/AArch64/AArch64InstrFormats.td
The file was modifiedllvm/lib/Target/AArch64/AArch64InstrInfo.td
Commit 6fbc167c0a8bbf41f33d0b5937ec5ca3488456a7 by cullen.rhodes
[WebAssembly] NFC: Remove unused tblgen template args

Identified in D109359.

Reviewed By: aheejin

Differential Revision: https://reviews.llvm.org/D109689
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyInstrAtomics.td
Commit ad88632b650325af755ae42ff29114c1f6eb2841 by Justas.Janickas
[OpenCL] Tests C++ for OpenCL version macros

Version macro definitions are tested for C++ for OpenCL when
explicit version is provided on command line via `-cl-std` flag.

Differential Revision: https://reviews.llvm.org/D109366
The file was modifiedclang/test/Preprocessor/predefined-macros.c
Commit f28740541942ea4d68b968af279bcd6793732f00 by Tim Northover
AArch64: fix indentation of ProcAppleA14. NFC.
The file was modifiedllvm/lib/Target/AArch64/AArch64.td
Commit 2d6829bbbe6877920d9be1db93b9f3fc85b43d10 by mizvekov
[clang] disable implicit moves when not in CPlusPLus

See PR51842.

This fixes an assert firing in the static analyzer, triggered by implicit moves
in blocks in C mode:

This also simplifies the AST a little bit when compiling non C++ code,
as the xvalue implicit casts are not inserted.

We keep and test that the nrvo flag is still being set on the VarDecls,
as that is still a bit beneficial while not really making anything
more complicated.

Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>

Reviewed By: NoQ

Differential Revision: https://reviews.llvm.org/D109654
The file was addedclang/test/AST/nrvo.c
The file was modifiedclang/lib/Sema/SemaStmt.cpp
The file was addedclang/test/Analysis/blocks-nrvo.c
Commit 3582828748282708ea33cadb587b637d9ffa8546 by chennngwang
[libc][Obvious] Some clean work with memmove.
The file was modifiedlibc/src/string/memmove.cpp
The file was modifiedlibc/test/src/string/memmove_test.cpp
The file was modifiedlibc/src/string/memmove.h
Commit a91cfd1990255aea545683083329c2ad3fee4518 by uday
[MLIR] Improve op parse error message for AtLeastNOperands trait

Improve parse error message for "at least N operands" op trait.

Differential Revision: https://reviews.llvm.org/D109747
The file was modifiedmlir/lib/IR/Operation.cpp