[Option] Add and use LLVM_REGISTER_LIBRARY_OPTIONS. NFC (#239887)
Extract from #239678: Exempt the file-scope registration of options
struct from -Wglobal-constructors, in preparation for enabling
-Werror=global-constructors for llvm/lib.
[CGP] Fix incorrect sized ConstantInt crash
Fixes a buildbot failure after #226197, https://lab.llvm.org/buildbot/#/builders/210/builds/13772.
We were always using a 64-bit APInt for StructSize which causes a type mismatch and crash for 32-bit targets with scalable vectors, e.g. riscv32 with +v
[perf-training][merge-fdata] Clean up input fdata files (#139650)
BOLT AArch64 worker has been running out of disk space due to excessive
fdata files being produced from clang-bolt builder. Delete merged fdata
files to counter disk space waste.
[Clang][C++2d] Implement defaulted postfix increment and decrement operators (P3668R4) (#229560)
Paper:
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3668r4.html
Allow the postfix `operator++(int)` and `operator--(int)` to be
explicitly defaulted, as specified by P3668R4 ([over.inc.default]). The
implicit definition of a defaulted postfix operator for a type `C` is
equivalent to
```cpp
C tmp(c);
++c; // or --c
return tmp;
```
where c denotes `*this` for an implicit object member function and the
first parameter otherwise. The copy is direct-initialized and `tmp` is a
candidate for named return value optimization.
[32 lines not shown]
[compiler-rt][test] Use sysroot dynamic linker and rpath on Linux (#239878)
Follow-up to https://github.com/llvm/llvm-project/pull/239742.
`glibc-X.Y` lit features are detected from `CMAKE_SYSROOT` headers, but
test binaries still executed against the host's glibc at runtime,
breaking
tests like `preinit_array.cpp` (`UNSUPPORTED: glibc-2.34`) and
`getline_nohang.cpp` (`UNSUPPORTED: glibc-2.38`) when the host glibc is
newer than the sysroot.
Assisted-by: Gemini
CodeGen: Remove clearKillFlags calls on virtual registers (#239778)
Kill flags are no longer permitted on virtual registers, so clearing
them is a no-op. Remove the calls in generic passes where the register
can only be virtual.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[clang][NFC] Clean up conditional statement and make pointer type explicit (#239279)
Remove redundant `else if` and replace with `if` in conditional logic.
The first `if` condition will cause an early return and making the next
condition an `else if` is not beneficial here.
Define `Delim` as a `const auto*` pointer to make the variable type
explicit.
Signed-off-by: Hardik Kumar <hardikxk at gmail.com>
[RegAllocFast] Drop kill flags on virtual registers from the fold tests
The machine verifier now rejects them (#239012). The fast register
allocator works out where each value dies on its own, so the output is the
same without them. That makes tied_input_dies_no_kill_flag a copy of
tied_input_dies, so remove it.
Assisted-by: Claude Opus 5.5
[lldb] Honor the arm64 subtype when launching on Darwin (#239423)
LaunchProcessPosixSpawn treated a CPU subtype of 0 as unset and fell
back to posix_spawnattr_setbinpref_np, which only takes a CPU type.
CPU_SUBTYPE_ARM64_ALL is 0, so launching the arm64 slice of a
universal arm64/arm64e binary ran the arm64e slice while LLDB
reported arm64. debugserver had the same check.
With the check gone, the kernel requires an exact subtype match. Map
arm64_32 to CPU_SUBTYPE_ARM64_32_V8 in debugserver instead of 0.
rdar://191339428
Assisted-by: Claude
[lldb] Forward real registers in TestScriptedFrameProvider's frame without variables (#239875)
`test_expression_at_frame_without_variables` failed on aarch64 Linux
with "Couldn't allocate space for materialized struct". Its scripted
frame had no register context, so LLDB couldn't allocate memory in the
inferior to run the expression from that frame. On macOS, debugserver
allocates memory without going through the frame, which is why the test
passed there.
This patch makes the frame forward the registers of the real frame it
replaces, so evaluating an expression there works like at a regular
frame. It still keeps the default `get_variables()`, which the test is
about.
Assisted-by: Claude
Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>