make: support CORE_TREE and related plumbing
Rename CORE_COMMIT to make it less ambiguous as CORE_HASH is the
commit hash and CORE_TREE is the tree hash. It was also in the
metadata for no apparent reason.
[mlir][affine] Implement RegionBranchOpInterface for affine.parallel
The implementation is similar to SCF: only control flow is declared but no data
flow along the edges since it is not 1:1.
[ObjCDirectPreconditionThunk] Use canonical declaration to find visibility of hand-written accessors (#242130)
With `-fobjc-direct-precondition-thunk`, a direct method takes its
explicit visibility attribute, and an accessor falls back to its
property's. The property was found with `findPropertyDecl()`, which
works well for implicitly declared accessors. But a hand-written one
isn't marked, so it stayed hidden even when its property had
visibility("default"), and a client in another linkage unit failed to
link against its symbol.
Find the property through the method's canonical declaration, which is
marked. Check the method's own attribute first, so an attribute on the
accessor wins over its property's. Before, a synthesized accessor took
its property's attribute, or the lack of one, and ignored its own.
A readonly property redeclared readwrite in a class extension now gives
its setter the redeclaration's attribute, not the public property's. The
getter still takes the public property's.
[FlowSensitive][Expected] Add a base dataflow model for `bugprone-unchecked-expected-access` [PR 1/N] (#242868)
This is the first part of a split of #233219 .
It adds only the base dataflow model and its unit tests.
Model supports `std::expected` as well as `tl::expected` from
https://github.com/TartanLlama/expected since it's a very popular
backport option in a codebase where I work. And API differences are
minimal.
The clang-tidy check and the rest of the modeling will follow in
separate PRs.
Current expected scope of diagnostics:
```cpp
void f(std::expected<int, int> e) {
e.value(); // diagnosed: unchecked value access
if (e) {
[15 lines not shown]
nix: build illumos-joyent incrementally with tools/illumos_workspace
tools/illumos_workspace [-d DIR] env|bldenv [COMMAND]|nightly|image runs
the illumos nightly in a checkout (projects/illumos by default), as
gmake world does, with the Nix build's compiler and tools in place of
pkgsrc and the strap cache (nixpkgs-illumos' smartos-illumos.workspace),
rebuilds a directory with dmake under bldenv, and makes a platform with
what the checkout built (build_nix --illumos-proto): quick, stamped as
dirty, not a Nix output. The pin moves to nixpkgs-illumos ffffa44, which
has them.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
[lldb] Remove ConstString from ModuleList (#244423)
This removes ConstString from ModuleList's APIs. There are still
ConstStrings in the ModuleList implementation, but only to meet API
requirements. Future changes will remove those.
I also removed ConstStrings that were created for the purpose of
querying a ModuleList.
linux: Destroy the per-VNET unit allocator after the cloners
linux_ifnet_vnet_uninit() deletes the unit number allocator that
linux_ifnet_departure() frees into. It ran at SI_SUB_INIT_IF,
SI_ORDER_ANY, the same slot in which lagg, vlan, edsc and ng_eiface
destroy the interfaces left in a dying vnet. Destructors of equal order
run in the reverse of the order their modules were loaded, so with
linux_common loaded after if_lagg the allocator was gone by the time
vnet_lagg_uninit() detached its interfaces, and removing a vnet jail that
still held a lagg interface panicked in free_unr().
Commit a23901a37be9 moved the destructor from SI_SUB_PROTO_IF to
SI_SUB_INIT_IF for the cloners that tear down earlier, which left this
tie.
Run the destructor at SI_ORDER_FIRST, which is after every destructor of
a later order in the same subsystem, whatever the load order. Move the
constructor with it.
[6 lines not shown]
[lldb] Let language plugins decide where their categories apply (#244413)
This patch adds Language::IsCategoryApplicable() and moves the rules of
TypeCategoryImpl::IsApplicable() for C++, Objective-C and Objective-C++
categories into those language plugins. The rules for categories without
a language and for C categories stay, because no plugin claims C.
Assisted-by: Claude
[flang][OpenMP] Do not register DECLARE_REDUCTIONs in METADIRECTIVEs (#243868)
Since declarative METADIRECTIVEs are not handled yet, they shouldn't
produce any side-effects. Specifically DECLARE_REDUCTION directives
should not actually declare anything.
This PR eliminates the actual declaration of the reduction-identifier
associated with a DECLARE_REDUCTION in a METADIRECTIVE.
[flang][OpenMP] Handle declarative METADIRECTIVES more carefully (#243867)
Diagnose declarative METADIRECTIVEs with executable variants as errors.
A METADIRECTIVE is considered executable if it contains at least one
executable variant. Mixing declarative and executable variants is not
supported.
There are several things that can appear in either the specification
part
or in the execution part in a Fortran program unit. METADIRECTIVEs are
one example, and there is already code that tries to canonicalize then,
i.e. move them into the execution part if they are considered executable
and are at the end of the specification part.
In fact, the entire tail of the specification part is moved into the
execution part if it could be considered executable.
Since OmpMetadirectiveDirective is an allowed member of a specification
part, the parser will preferentially insert METADIRECTIVEs into the
specification part even if they are executable according to the above
[8 lines not shown]
Fix tests in sysutils/restic
- Use GNU tar for integration tests (which expect --no-same-owner)
- Skip unsupported xattr and unprivileged sticky-bit file restore tests
on OpenBSD
OK sthen@
LinuxKPI: Include <linux/fs.h> from <linux/mm.h>
and <linux/kernel.h> from <linux/io.h>.
This reproduces the same namespace pollution as Linux and will help us
to fix historical bug when these files were included from <linux/fb.h>.
Fix conflicting Linux name leakage appeared in qat(4) as result.
Differential Revision: https://reviews.freebsd.org/D60798
LinuxKPI: Add mapping_gfp_mask() and four more folio/pagemap helpers
Adds mapping_gfp_mask(), mapping_gfp_constraint(), mapping_set_unevictable(),
folio_page() and folio_file_page(), which Linux's drm_gem_get_pages() uses.
drm-kmod carries them in an overlay for virtio-gpu (freebsd/drm-kmod#517) today.
The mask is GFP_KERNEL, as shmem page allocation may sleep and ignores
the other flags. folio_page() and folio_file_page() are exact copies
from D58763, to not clash with it.
Signed-off-by: Denis Borovikov <denis.borovikov at gmail.com>
Reviewed by: wulf
Differential Revision: https://reviews.freebsd.org/D61217
LinuxKPI: Add PCI method for transferring framebuffer parameters
from LKPI video driver to FreeBSD native framebuffer driver.
This makes possible to attach framebuffer driver in traditional way
using newbus interface rather than direct calls into vt internals.
It is required to make LKPI framebuffer driver compatible with
fbd/vt_fb. As a consequence that allows us to switch back to vt_fb on
radeon driver where vt_drmfb regressions have been reported [1].
The method expects fbd device ivars pointed to FreeBSD fb_info
structure embedded in to Linux fb_info structure. See linux/fb.h.
Note that some out-of-tree non-PCI drm drivers may require similar
changes in parent bus drivers.
[1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=285088
PR: 285088
Differential Revision: https://reviews.freebsd.org/D60038
[MLIR][Vector] Check the parent reduction's kind and uses before folding (#243140)
`ChainedReduction` rewrites `reduce_add(y, reduce_add(x, acc))` into
`reduce_add(x + y, acc)`. Here `reduce_add(x, acc)` is the parent
reduction: its result is the accumulator of the reduction being
rewritten. The pattern checked only the kind of the reduction it
rewrites, not the parent's kind. So `reduce_add(y, reduce_maxsi(x))`
became `reduce_add(x + y)`. With `x = [1, 2]` and `y = [0, 0]`, the
result changed from 2 to 3.
This patch folds only when the parent reduction is an `add` reduction
too. It also folds only when the parent's result has one use. Then the
parent is dead after the fold and can be removed. With other uses it
must stay, and the fold keeps both reductions.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Add upgradable
This new command provides an easy way for scripts to determine whether
updates are available for any currently installed package, or for a
specific currently installed package or set of packages. Locked
packages are ignored unless --force / -f is specified.
The command-line syntax is largely the same as for upgrade, and the
output (if --quiet / -q is not specified) is largely the same as well.
pkgdb_iterator: Free package when done
The iterator currently frees the current package when it advances, but
not when it reaches the end, resulting in hard-to-fix memory leaks.
[lldb] Let expressions use zero-size variables without a location (#244320)
Currently an expression that uses a variable of a zero-size type without
a location fails. Since #243284 such a variable has a value without
data, so the Materializer copies its zero bytes into a temporary region
and then fails to read them back. A zero-length array fails even
earlier, because the symbol file reports the size of one element for its
type.
This patch fixes this by giving such a variable a null pointer as its
address instead of a temporary region.
Assisted-by: Claude
18715 PCI host bridges identified only by _CID are not recognised
Reviewed by: Luqman Aden <luqman at oxide.computer>
Reviewed by: Michael van der Westhuizen <r1mikey at gmail.com>
Approved by: Gordon Ross <gordon.w.ross at gmail.com>