[lld][MachO] Support Objective-C class stubs
Teach Mach-O objc stubs to synthesize class-message stubs that load the class object, selector, and objc_msgSend target.
lld already supports the Apple clang _objc_msgSend$<selector> stub form, even though upstream clang does not currently expose a driver or cc1 flag for emitting it. Apple clang also emits _objc_msgSendClass$<selector>$_OBJC_CLASS_$_<class>; handling that form completes the existing selector-stub support.
Cover local classes, dylib classes, archives, dynamic lookup via -U, missing class symbols, malformed names, unsupported architectures, and dead stripping.
Follow the nextbsd-kernel-extensions rename
nextbsd-kernel-modules is now nextbsd-kernel-extensions, matching the
NextBSD-kernel-extensions package it produces. References also move off
the pre-rename nextbsd-redux org name, which worked only via redirect.
Co-Authored-By: Claude Opus 5 (1M context) <noreply at anthropic.com>
Claude-Session: https://claude.ai/code/session_01PazZbkdGvuW6yjpLbREcfJ
Pass `app` through the `service.control` verb dispatch
## Problem
Bringing `service.start/stop/restart/reload` back as public `pass_app=True` API methods changed their signatures to `(self, app, service, options)`, but the verb dispatch inside `service.control` still called them the old private way. `app` is only ever injected by `middleware.call`, so a bound-method call left the service name sitting in the `app` slot and handed the options dict to `ServiceStartArgs.service`, which fails validation. Every service start/stop/restart/reload on the box goes through that dispatch, so all of them were broken.
## Solution
- **Pass `app` through the dispatch.** Restores parity with master and lets the per-method privilege checks see the real session again.
- **Check privileges before looking the service up in `reload`.** The other three verbs already do this; doing the lookup first let an unprivileged caller tell a real service name from a bogus one by which exception came back.
- **Let the `audit_extended` lambdas accept `options`.** They are called with the raw client params, so any call that passed options raised `TypeError` inside the audit path's bare `except` and silently dropped the verb and service name from the audit description.
[lldb] Untangle PlatformDarwinKernel's kext and kernel index lookups (#220318)
PlatformDarwinKernel searches an index of the local filesystem for kexts
and kernels, but each search was interleaved with creating the Module,
updating the Target and falling back to PlatformDarwin, so nothing else
could reuse it. Pull the two searches out so a follow-up can answer
Platform::FindModuleFiles with them.
This change is NFC except GetSharedModuleKernel assigned module_sp
before testing whether the candidate matched and never cleared it, so a
failed search would still return the last *non-matching* module.
[mlir][SCFToControlFlow] Carry LLVM attributes through scf.parallel lowering (#219218)
`ParallelLowering` builds its `scf.for` nest without copying anything from the
`scf.parallel`, so an `llvm.loop_annotation` placed on a parallel loop is
silently dropped before `ForLowering` can move it onto the latch branch.
`scf.for` and `scf.while` already propagate LLVM-dialect attributes via
`propagateLoopAttrs`, so do the same for `scf.parallel`. A multi-dimensional
`scf.parallel` carries a single attribute dictionary but becomes several loops,
so the attributes go to the innermost one, whose latch is where `ForLowering`
attaches the loop metadata.
Tests cover the 1-D case and a 2-D nest, where the outer latch is checked to
stay unannotated. Verified that the new tests fail without the fix and pass with
it, and that the pre-existing expectations in `convert-to-cfg.mlir` are
unchanged.
[BOLT] Fix data race on the shared .dwp DWARF context (#220119)
As noted by labrinea, 775dc9b8bf58 ("[BOLT] Create and release .dwo
DWARF contexts incrementally") releases every DWO context at the end of
readDebugInfo, leaving the bucket threads of the DWARF rewrite to
re-open them on demand. With a .dwp package that moved the first touch
of a shared context into the parallel phase, and multiple threads
compete for it, in a race for the abbrev table, causing intermittent
failures in dwarf5-ftypes-dwp-input-dwo-output.test.
Open the split CUs of a package up front, from a single thread, and
resolve the abbreviation table of every unit in it. This is not relevant
for the non-dwp case, which is unaffected.
[AMDGPU] Fix user SGPR accounting when parsing MIR
Count privateSegmentSize and LDSKernelId as user SGPRs to preserve the kernel
descriptor count across MIR round trips.
Fixes LCOMPILER-2700.
[ADT] Exit doFind on an empty map, not just an unallocated one (#220294)
`doFind` exits early only when no buckets were ever allocated. A map that
had entries and lost them keeps its bucket array. `NumBuckets` is then not
zero, so every lookup hashes the key and probes.
For a `SmallDenseMap` in small mode, `NumBuckets` is the template parameter
`InlineBuckets`, a nonzero constant. The existing check can never fire for
those maps. An empty one hashes and probes on every lookup.
`getNumEntries() == 0` covers both cases. It also subsumes the old check.
There are no entries without buckets, so `Mask = NumBuckets - 1` is still
safe. It is one test either way, so non-empty lookups are unchanged. The
check goes before `getRep()`. Keeping it after costs 0.158% on clang, so
those loads are not sunk past the branch.
| workload | instructions:u |
|---|---:|
| clang compiling 600 LLVM/Clang/MLIR translation units | **-0.028%** |
[8 lines not shown]
[SampleProf] Strict handling suffixes without trailing "." (#220320)
Trailing "." is followed by variable part of the suffix.
As is, for non dot terminated suffix, getCanonicalFnName pass
with "Dit == It" and cuts any suffix with starts with `Suffix`.
E.g. ".cfi" suffix will match will consume "foo.cfi_something" else,
I believe this is unintentional in general and undesired for ".cfi",
which can match ".cfi_jt".