[lldb][test] Allow dotest.py to call for Xcode to attach (#209628)
This speeds up the debugging of API tests a little on macOS.
(AppleScript written by Claude based on Xcode.sdef)
[clang][mingw] Try both native and ARM64EC triples when looking for a sysroot on the ARM64EC target (#210017)
Similarly to MSVC, a MinGW toolchain may provide support for both ARM64
and ARM64EC in a single sysroot. Structuring the toolchain this way has
the additional advantage of seamlessly supporting linking ARM64X images.
Support this configuration in findClangRelativeSysroot.
[NFC][LSR] Remove duplicate debug expression update (#210188)
Remove duplicate debug expression update we assigned
the same DIExpression twice so let's just remove the redundant call.
Tested via make check.
Assisted by AI.
[libc] Move gettimeofday to sys/time.h header. (#210185)
`gettimeofday` is supposed to be declared in the `<sys/time.h>` header,
not the `<time.h>` where we've had it previously. Move the declaration
to the correct header, and move the files with implementation and unit
tests accordingly.
Note that `gettimeofday` is removed removed from POSIX-2024, but let's
keep it available for now, since there's fair amount of existing code
that still uses it.
[NFC] Inline DwarfExpression frame register check (#210186)
Inline DwarfExpression frame register check as it's the only call.
Tested via make check.
Assisted by AI.
[RISCV][P-ext] Add RISCVISD::PWZIP for RV32. (#210134)
This node takes 2 32-bit vector inputs and produces a 64-bit vector
result. By extracting the subvector during lowering, we expose more
opportunities for optimizations.
[Android] Drop workarounds for older Android API levels pre 23 (#161893)
Drop workarounds for Android API levels pre 23.
The minimum Android API currently supported by the LTS NDK is 23.
[AArch64][COFF] Branch-protection=standard/pac-ret means "b-key" on Windows (#203989)
On AArch64 Windows the `B-key` is the only supported key for userspace,
let's make "standard" and "pac-ret" options generate "b-key".
Fixes: #203852
[Clang][Sema] Reland -Wstringop-overread with computeDependence fix (#208012)
Reland #183004 and follow-up #205201 (reverted in #207840) which adds `-Wstringop-overread` to warn when memory functions `memcpy`, `memmove`, `memcmp`, and other related builtins read more bytes than the source buffer size.
The revert was due to a crash when a memory function is called on `&x` where `x` is a static constexpr local inside a template. The original PR exposed a bug in `computeDependence(UnaryOperator*)` where only the value-dependence bit is set for this case, when the instantiation-dependence bit should also be set. This is the root cause behind the crash.
Fix `computeDependence` to properly set both value and instantiation-dependence bits, and add a regression for this crash via `warn-stringop-overread.c`.
CodeGen: Rename LibcallLoweringModuleAnalysisResult to ModuleLibcallLoweringInfo
Avoid putting pass manager flavored naming in this class. This is analagous to
TargetLibraryInfo's TargetLibraryInfoImpl.
Co-authored-by: Claude (Claude Opus 4.8) <noreply at anthropic.com>
[flang][cuda] Use managed allocation for saved locals (#210133)
Example:
```fortran
subroutine work
real, allocatable, save :: q(:)
allocate(q(10))
end
```
`SAVE` gives the local allocatable descriptor static storage. Implicitly
attributing it as Unified causes allocation to look it up as a
registered CUDA global, but no device symbol is registered for the
descriptor.
Fix: use Managed attribution for saved subprogram-local allocatables and
pointers, avoiding the invalid CUDA symbol lookup.
[TableGen] Short-circuit !cond operator (#208942)
Fixes #163213
TableGen `!cond` operator currently resolves all subsequent conditions
and values even if it already found a condition that resolves to `true`.
This change short-circuits on the first `true` resolution found
iterating from left to right. It folds a new `CondOpInit` with only the
conditions and values that have already been resolved, including the
current condition and value.