[clang][python] Rename ClangObject to OpaqueClangObject and update its description (#229374)
This patch documents the existing way `ClangObject` is used in
`cindex.py` and renames it to `OpaqueClangObject` to better reflect its
purpose. In one case (`CodeCompletionResults`) it's used as a base class
for objects that wrap transparent C objects, but this case will be
eliminated by #224678.
---------
Co-authored-by: Jannick Kremer <jannick.kremer at mailbox.org>
AMDGPU: Use HasUsableDSOffset for LDS read2/write2 patterns
The 64-bit and 128-bit LDS patterns that split into read2/write2 were
predicated on isGFX7Plus, based on the usable offset condition. Use a named
predicate instead of the version check.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
www/{nginx,nginx-devel,freenginx}: 3rd-party modules management
Use the new www/nginx-module-ajp source port instead of fetching
nginx_ajp_module from GitHub.
Sponsored by: Netzkommune GmbH
www/nginx-module-ajp: Add New Port
The ajp module proxies requests to a backend over AJP13 instead of HTTP.
This port installs the module sources only, the module itself is built
by the nginx ports.
Sponsored by: Netzkommune GmbH
clang: Fix tests when built with DEFAULT_SYSROOT (#229417)
Configuring with DEFAULT_SYSROOT applies the default sysroot to every
target, not just the host/default. This broke cross-target driver tests that
expect the sysroot to be derived from the GCC installation or the driver's
install directory. Pass an empty --sysroot= to defeat the configured default,
following the precedent of 4bc05627199
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Reland "[AMDGPU] Legalize uniform 16-bit loads to match subword load instructions- #225097" (#229221)
Reland https://github.com/llvm/llvm-project/pull/225097. In
`isTypeDesirableForOp` correctly check for uniform loads to prevent `i16
= trunc (zextload i16->i32)` from being converted back to a uniform i16
load. This would be legalized back to `i16 = trunc (zextload i16->i32)`
creating an infinite loop.
---------
Signed-off-by: John Lu <John.Lu at amd.com>
[clangd] Add an early initialization hook to FeatureModule (#225198)
This is a follow-up to the FeatureModule extension in #221054.
Feature modules may need to configure diagnostics before frontend
initialization. Both `beforePPCallbacks()` and `beforeExecute()` run
after `BeginSourceFile()`, which can already emit diagnostics while
initializing the preprocessor or loading precompiled modules.
This change adds `beforeBeginSourceFile()` for configuration that must
precede `BeginSourceFile()` during main-file builds.
For example, clang-tidy applies warning options from `ExtraArgs` and
`ExtraArgsBefore` before `BeginSourceFile()`. The new hook allows this
configuration to move into a feature module without changing when those
options take effect.
These changes prepare moving the clang-tidy implementation into a
FeatureModule.
RFC:
https://discourse.llvm.org/t/rfc-clangd-move-clang-tidy-integration-into-a-featuremodule/91707
[LiveDebugVariables] Repair stale SlotIndexes
The analysis keeps its indexes from before the first register allocator
until DBG_VALUEs are emitted, by which point passes in between have
erased some of the instructions they point at. Resolve them at the
start of each allocator run and before emitting.
SlotIndexes can then reclaim the entries of erased instructions without
sparing the ones held here, which would have made generated code depend
on -g. Emitted locations are unchanged, except that intervals resolving
to one position now emit a single DBG_VALUE rather than identical
consecutive ones.
[SlotIndexes] Add queries for stale indexes
An erased instruction leaves its index list entry in place, making the
index indistinguishable from a block boundary entry. Add
isBlockBoundaryIndex() and isStaleIndex() to tell the two apart, and
canonicalizeIndex() to resolve a stale index to the closest preceding
instruction's register slot, or the block start if none survives.
NFC. No caller yet. LiveDebugVariables is next.
[lldb][NativePDB] Reuse the method decl added while completing the class (#227010)
`PdbAstBuilderClang::CreateFunctionDecl` returned `nullptr` for a method
that `UdtRecordCompleter` had already added to its class. Because of
this, the `Function` of any method whose class was completed first had
no decl and no decl context. `GetOrCreateDeclContextForUid` then passed
that null `DeclContext` to `TypeSystemClang::CreateDeclContext`, which
asserts:
```
Assertion failed: Val && "isa<> used on a null pointer"
...
lldb_private::TypeSystemClang::CreateDeclContext
lldb_private::npdb::PdbAstBuilderClang::GetOrCreateDeclContextForUid
lldb_private::npdb::SymbolFileNativePDB::GetDeclContextForUID
lldb_private::Function::GetDeclContext
lldb_private::ClangExpressionDeclMap::LookupFunction
```
[16 lines not shown]
[lldb][test] Check the sp lookup in register sets that have no rsp (#229401)
Since llvm#223857, `GetIndexOfChildWithName("sp")` in a set holding the
architectural sp but not rsp (Windows "supplementary registers") finds
that sp, but the early continue from llvm#226176 skips those sets, so
the else block asserting it never ran.
This patch drops it and compares against "esp" on i386, where sp shares
a set with esp and the continue was what kept the else branch from
failing. x86_64 sets that hold rsp are checked as before.
[clang][deps][test] Avoid cat in modules-incomplete-umbrella.c, NFC (#229286)
This test intermittently fails with a truncated JSON input to
scan-deps-filter. Have scan-deps-filter read the clang-scan-deps output
file directly, bypassing lit's in-process cat as a speculative fix.
[CIR] Align kernel calling conventions (#229295)
Override getDeviceKernelCallingConv for AMDGPU (amdgpu_kernel) and NVPTX
(ptx_kernel), as classic CodeGen does. Without them, SYCL kernels on
these targets hit the OpenCL-only assert in the base hook and OpenCL kernels
were emitted with the C calling convention.
[lldb][test] Skip TestExitDuringStep.py on Arm 32-bit Linux (#229425)
This is flakey because a thread sometimes stops in a function we cannot
backtrace from due to
https://github.com/llvm/llvm-project/issues/217961.
[lldb][Windows] Keep the process info when the parent pid lookup fails (#228455)
`Host::GetProcessInfo` sets the executable and architecture from the PE
header, then takes a
[`Toolhelp`](https://learn.microsoft.com/en-us/windows/win32/api/_toolhelp/)
snapshot whose only contribution is the parent process id. Every failure
path in that second half returned `false`, discarding the architecture
it had already determined.
The snapshot is racy and the pid can still be absent from the walk. When
that happens on attach, `NativeProcessWindows` leaves `m_arch` unset and
the first register context hits
```
Assertion failed: target_arch.GetMachine() == llvm::Triple::x86_64,
RegisterContextWindows_x86_64.cpp, line 138
```
which kills `lldb-server`, so a second attach in the same test reports
'lost connection'.
[4 lines not shown]
Merge tag 'ata-7.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux
Pull ata fix from Niklas Cassel:
- Set CHECK CONDITION for failed ATAPI commands.
Since commit 2e1d2e65e773 ("ata: libata-scsi: terminate deferred
commands on time out") failed ATAPI commands incorrectly stopped
having CHECK CONDITION set for commands that had a SCSI midlayer
byte set by scsi_check_sense(). SG_IO users therefore saw failed
ATAPI commands as successful (Hengyu)
* tag 'ata-7.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux:
ata: libata-scsi: do not lose CHECK CONDITION for failed ATAPI commands
[lldb][test][Windows] Test attaching to a process past MAX_PATH (#229396)
This patch adds a test to attempt attaching to a process past
`MAX_PATH`.
Spawn the longpath test program from a path longer than `MAX_PATH`,
attach to it by pid from an empty target, and check that the target has
a known architecture, frame 0 is in a module and the executable is
loaded.
This is the lldb-server attach path that asserts in
`RegisterContextWindows_x86_64` when Host::GetProcessInfo cannot not
open the image:
https://github.com/llvm/llvm-project/blob/28f349c30963e5ab71c9325e032ddfa6464c3f0e/lldb/source/Plugins/Process/Utility/RegisterContextWindows_x86_64.cpp#L138
[LV] Flatten reduction handling in preparePlanForEpilogueVectorL (NFC) (#229416)
The else branch after the AnyOf/FindIV handling is redundant due to
early continue.
Remove it and re-use ReductionPhi and RK instead of re-casting R.
This slightly simplifies the code and reduces diff in planned follow-up.
[libc++abi] Define `__cxa_thread_atexit` on platforms that need it (#186054)
Commit 3c100d5d548d removed the definition of __cxa_thread_atexit from
all platforms except Fuchsia and Linux. This broke the use of
`thread_local` variables with destructors on other downstream
configurations that needed the definition.
This patch restores __cxa_thread_atexit on (presumably) all platforms
that need it.
Co-authored-by: Louis Dionne <ldionne.2 at gmail.com>
[libc++] Enable _LIBCPP_DIAGNOSE_IF on AppleClang (#229187)
_LIBCPP_DIAGNOSE_IF was introduced in Clang 20, so it is supported by
AppleClang now. Also drop the (now dead) conditional for Clang > 20,
which is always true since libc++ supports Clang >= 21.
[libc++] Guard unchecked uses of wchar_t and char8_t in tests (#229255)
A few places in the test suite were not properly guarding based on
whether wide characters or char8_t are available.
dns/ddclient: add force refresh (#5758)
* dns/ddclient: add force refresh
Add a "Force refresh" command to the Accounts grid, per row for enabled
accounts and for the selected rows (native backend only). The cached
state of the requested accounts is cleared in a locked state while the
service is stopped, so the service updates them on startup using the
regular account implementation, even when the detected address equals
the one sent before. Normal polling is unchanged.
The grid is reloaded until the requested accounts show a new update
time, accounts without an update are reported after 30 seconds.
Refs #5757
* dns/ddclient: force refresh, simplify as reviewed
Reset the cached state (-r/--reset-state) and restart the service
[9 lines not shown]
[AArch64] Use multi-vector intrinsics for masked load/store users of predicate-as-counter
If the user of the original wide mask is a masked load or store
intrinsic (matching the element size of the predicate-as-counter),
rewrite it directly to a masked multi-vector load/store.
This avoids materializing the vector mask and is easier to handle here
than later (e.g. in SelectionDAG), since we do not need to match the
concatenation of all `pext` segments of the predicate-as-counter.
Assisted-by: Codex