[lldb] Fix dwim-print's arrow-operator check to match the substring (#225778)
`CommandObjectDWIMPrint::DoExecute` decides whether to try `expr` as a
limited, dot-only frame variable path before falling back to full
expression evaluation. The comment above the check says a variable
path is not attempted if `expr` contains the arrow operator (`->`) or
the subscript operator (`[]`), or a bare `*` or `&`:
```
const bool try_variable_path =
expr.find_first_of("*&->[]") == StringRef::npos;
```
`find_first_of` treats its argument as a set of characters so this also
matches a lone `-` or a lone `>` anywhere in `expr`, not only the
two-character `->` sequence the comment describes.
Fix the check to test for the `->` substring directly with
`StringRef::contains`, keeping `find_first_of` only for the four
characters that are genuinely excluded one at a time (`*`, `&`, `[`,
`]`).
[29 lines not shown]
[lldb] Fix crash on a trailing '-' in a legacy variable expression path (#225661)
`StackFrame::LegacyGetValueForVariableExpressionPath` walks a variable
expression path one separator character at a time. On seeing a `-` it
checks that the following character is `>`, to confirm this is really
the `->` operator and not something else:
```
case '-':
expr_is_ptr = true;
if (var_expr.size() >= 2 && var_expr[1] != '>')
return ValueObjectSP();
...
var_expr = var_expr.drop_front(); // Remove the '-'
[[fallthrough]];
case '.': {
var_expr = var_expr.drop_front(); // Remove the '.' or '>'
```
The `var_expr.size() >= 2` guard is only meant to make the `var_expr[1]`
read safe, but it also disables the whole check when `var_expr` is
[26 lines not shown]
Reland "[AMDGPU] PromoteAlloca: flatten homogeneous structs to vectors" (#221058)
This relands #217055
The original commit revealed a latent issue in eliminateFrameIndex in
SIRegisterInfo where SCC can be clobbered before reading it on
gfx900/gfx90a. This change itself has no known issues.
[AMDGPU] Update based on review feedback
Replace the lambda with the check inlined at both sites, and report a fatal
error when neither a free SGPR nor FrameReg is available, rather than
silently falling back to the spilling scavenge.
[AMDGPU] Use the scavenger to test whether SCC is live after MI
The register scavenger is stepped backwards to the liveness state
immediately after MI, so RS->isRegUsed(SCC) already answers "is SCC live
after MI" directly. Replace the hand-rolled test with that query.
[AMDGPU] Don't spill an SGPR while SCC is live in frame index lowering
When SCC is live into a scalar frame index user, the scaling path avoids
SALU ops that write SCC by computing the address in a VGPR and reading it
back with V_READFIRSTLANE_B32. If the destination of that readfirstlane is
scavenged with spilling allowed, an AMDGPU SGPR spill writes inactive
lanes, so it flips EXEC with S_NOT_B64 and clobbers SCC. Instead, scavenge
that register with AllowSpill=false.
[NFC][AMDGPU] Add tests for SCC live into a frame index user
Pre-commit tests for the case where SCC is live into a frame index user and
no SGPR is free to hold the V_READFIRSTLANE_B32 result. Scavenging one
emergency-spills an SGPR, and an SGPR spill flips EXEC with S_NOT_B64, so the
EXEC flips land between the S_CMP_EQ_U32 that defines SCC and the read of SCC
that follows, clobbering it in between.
[AMDGPU] Insert V_NOP after V_PERM_PK16 (gfx1250 hazard)
On gfx1250 the V_PERM_PK16 family (V_PERM_PK16_B4/B6/B8_U4) has a hazard:
the instruction must be immediately followed by a "safe" instruction that
issues on the pipe which clears the hazard. Insert V_NOP as needed.
Also updated hasUnwantedEffectsWhenEXECEmpty() to ensure V_PERM_PK16 and
the inserted V_NOP are under non-zero EXEC.
Fixes: ROCM-26041
Assisted-by: Opus 4.8 Medium
RISCV: Don't use MCTargetOptions::ABIName in the ELF target streamer (#224704)
The abi name should come from the target-abi module flag in codegen,
which should be set up in the AsmPrinter. The ABI name field should
only be of practical use in the assembler, which reads the flag in
onBeginOfFile.
Co-Authored-By: Claude <noreply at anthropic.com> (Claude Opus 4.8)
[alpha.webkit.UncountedLocalVarsChecker] Wait for the instantiation to check a dependent local variable (#224566)
RawPtrRefLocalVarsChecker had the same false positive as the call
arguments checker: a local variable whose declared type is a concrete
raw pointer was reported when its initializer was still type-dependent.
In
template <typename T> void f(T& guard) {
Voice* v = guard.ptr();
}
the declared type Voice* makes isUnsafePtr fire, while guard.ptr() is a
CXXDependentScopeMemberExpr, so tryToFindPtrOrigin bails out before it
can reach the guardian analysis which makes the resolved form safe. The
instantiation is character for character the concrete form, which is not
reported.
Skip type-dependent initializers and traverse the instantiated call
operators of a generic lambda, as in the call arguments checker. Unlike
[5 lines not shown]
Always emit complete debug info for types which appear as a member of a standard-layout union. (#224439)
[[class.mem]](https://timsong-cpp.github.io/cppwp/n3337/class.mem#19)
states:
> "If a standard-layout union contains two or more standard-layout
structs that share a common initial sequence, and if the standard-layout
union object currently contains one of these standard-layout structs, it
is permitted to inspect the common initial part of any of them. Two
standard-layout structs share a common initial sequence if corresponding
members have layout-compatible types and either neither member is a
bit-field or both are bit-fields with the same width for a sequence of
one or more initial members."
This makes it possible to obtain a reference to a type which was never
constructed, which violates the assumption made by constructor homing
that all types that may require debug info must be constructed.
This change takes the conservative approach of always emitting full
[8 lines not shown]
[AArch64] Don't emit stack restore for SME ZA non-sibling tail calls (#224721)
A tail call from a function with live ZA state was previously prevented
from being lowered as a sibling call to have a CALLSEQ_START to glue
INOUT_ZA_USE to. This led to bogus stack restores.
We now drop the INOUT_ZA_USE marker on tail calls and can thus lower as
sibling calls if needed to take advantage of the existing correct stack
restore behavior.
This is safe to do since tail calls use TCRETURN and the MachineSMEABI
pass requires live ZA state to stay live across returns anyway.
www/tgpt: Update 2.14.0 => 2.15.0
While here, drop the knob for skipping Windows tests, upstream fixed it.
Changelog:
https://github.com/aandrew-me/tgpt/releases/tag/v2.15.0
Reported by: repology
Approved by: osa, vvd (Mentors, implicit)
Remove unneeded cl::Optional from named options. NFC (#225870)
cl::Optional is the default for cl::opt and has been no-op since
https://reviews.llvm.org/D120455 removed the "may only occur zero or one
times!" error.
Extracted from #225628
[CIR] Fix 'cookie' size of array delete on aligned type (#225806)
This came up in some test suite, the cookie size calcuation of a array
delete with a 'cookie' was incorrect if the type had an alignment. This
patch strings the correct alignment through the 'element_align' tag on
the array-delete operation, and uses that for the final calculation,
matching classic codegen.
[bazel] Use LZMA from bazel registry. (#225877)
PR #220092 added lzma support, but used the system copy of lzma for
bazel, saying it wasn't available in BCR. Since it actually is (under
the name "xz"), switch to using it from there.
security/sshguard: Add default "NO" to rcvar
Without a default rcvar set to NO, there are warnings like this:
/etc/rc: WARNING: $sshguard_enable is not set properly - see rc.conf(5)?
PR: 298781
Approved by: osa, vvd (Mentors, implicit)
MFH: 2026Q3
(cherry picked from commit 79e6862d9b008738beec5da53a29a61df69ef60d)
security/sshguard: Add default "NO" to rcvar
Without a default rcvar set to NO, there are warnings like this:
/etc/rc: WARNING: $sshguard_enable is not set properly - see rc.conf(5)?
PR: 298781
Approved by: osa, vvd (Mentors, implicit)
MFH: 2026Q3
Handle stepping through "lazy library" stubs (#225238)
This is a new linker feature that's available for programs built for
macOS 27 and later. The form of the stubs are slightly different, and
need a slightly different trick to get through them.