[clang][ssaf] Add `MultiArchStaticLibrary` data structure (#206148)
This change introduces `MultiArchStaticLibrary` that wraps
per-architecture `StaticLibrary` instances. It is the SSAF analogue of a
fat static library (the result of lipo -create over per-arch .a files).
Like `StaticLibrary` we don't need the fully decoded variant of this
data structure as it will be produced and read by the linker that does
not require the concrete summary data schema. Support for constructing
and consuming this data structure will be added in separate PRs.
rdar://181066557
[Clang] Rebuild lambda capture initializers in default member initializers
Fixes https://github.com/llvm/llvm-project/issues/196469
Since the CWG1815 implementation, InitListChecker rebuilds a default member initializer at its point of use in aggregate initialization. The rebuild uses the EnsureImmediateInvocationInDefaultArgs tree transform, where TransformCXXBindTemporaryExpr strips CXXBindTemporaryExpr nodes, relying on the subexpression's rebuild to recreate the temporary binding and re-register cleanups in the current evaluation context.
However, the transform overrides TransformLambdaExpr because the lambda body is not a subexpression. Returning the original lambda unchanged skips the MaybeBindToTemporary call that BuildLambdaExpr would normally perform, so the rebuilt initializer can lack the closure temporary binding and cleanup marker. CodeGen then misses the closure destructor and init-captured members can leak.
Lambda init-capture initializers are evaluated in the enclosing context and can also contain immediate invocations or source-location expressions that need to be rebuilt at the default-initializer use site. Rebuild those initializer expressions without rebuilding the closure type, capture declarations, or body, so body references to init-capture declarations remain valid. When a capture initializer changes, create a replacement LambdaExpr that shares the existing closure and body, then bind the lambda temporary explicitly to restore cleanup emission.
Co-Authored-By: GPT-5.5 <noreply at openai.com>
[libc++] Add a size-based representation for `vector` in the unstable ABI (#155330)
This commit adds an alternative representation for `std::vector` in a similar
manner to `__split_buffer` in #139632. This alternative representation was
measured to provide significant performance gains over the classic representation.
To do so, we introduce a layout type that tracks implementation details that
differ between the pointer-based vector and size-based vector representations.
`vector` does not parameterise its layout type, unlike `__split_buffer`.
`__split_buffer` is used by both `vector` and `deque`, and being able to take
an ABI break on `vector` doesn't automatically mean that users can also tolerate
a break on `deque`.
This new vector representation can be opted into by defining the
_LIBCPP_ABI_VECTOR_LAYOUT_SIZE_BASED macro when configuring the
library's ABI.
This change was the target of this RFC: https://discourse.llvm.org/t/adding-a-size-based-vector-to-libc-s-unstable-abi
Skip SYSTEM audit test if non-enterprise
This commit changes the tests/api2 test for system audit log
entries so that they only run on enterprise-licensed systems.
The practical impact is that they will only be run on nightly
CI runs rather than our incrementals.
[flang][OpenMP] Compute the set of loop directives in parser, NFC (#206748)
Use the constexpr functions for association and source language to
compute the set of loop-associated directives instead of listing them
individually.
[Flang][MIF] Adding support of intrinsics with coarray argument (#192944)
Added support for intrinsics that query the coarray in argument:
- Adding lowering and operation in MIF Dialect for UCOBOUND, LCOBOUND,
COSHAPE and IMAGE_INDEX
- Adding support of coarray argument for THIS_IMAGE in MIF Dialect (and
the lowering)
---------
Co-authored-by: Dan Bonachea <dobonachea at lbl.gov>
Co-authored-by: jeanPerier <jean.perier.polytechnique at gmail.com>
[clang-scan-deps] Add scan-deps-filter.py test helper to filter full output (#206758)
Add a helper script, which projects `clang-scan-deps` experimental-full
JSON down to a chosen set of fields, plus a `%scan-deps-filter` lit
substitution. A bare key (e.g. `file-deps`) matches that key at any
depth. A dotted path (e.g. `modules.command-line`) is anchored from the
document root to disambiguate keys when relevant.
This lets tests assert only on the fields they care about instead of
`CHECK`ing the whole object, which otherwise breaks whenever an
unrelated field is added/modified, and avoids gating emission behind
awkward per-field flags.
Migrate modules-full-by-mod-name.c as a first example.
Assisted-by: Claude Opus 4.8
Add pci_address field to VMNICDevice API
Exposes optional guest PCI address pinning for NIC devices, allowing
callers to request a specific bus/slot (e.g. bus=1, slot=0 -> enp1s0).
factory_utils maps the new field through to the truenas_pylibvirt
PciAddress dataclass.
[libc++] Move threading and random device config into <__configuration/platform.h> (#206262)
These are platform-specific configuration options, so they should live
`<__configuration/platform.h>`.
clang/AMDGPU: Fix double linking opencl libs with --libclc-lib
Noticed by inspection. If using an explicit --libclc-lib flag,
do not attempt to also link the rocm device libs which will contain
different implementations of the same opencl symbols.
Co-Authored-By: Claude <noreply at anthropic.com>
clang/AMDGPU: Remove driver restriction on --gpu-max-threads-per-block
Previously this flag was only handled for HIP, and would produce an unused
argument warning. There is a custom warning produced by cc1 that the
argument isn't supported, but practically speaking that was unreachable
due to not forwarding the argument. Also add a test for the untested warning.
Also use a simpler method for forwarding the flag to cc1.
clang/AMDGPU: Merge toolchain subclasses
Simplify the toolchain implementations by collapsing
them into one. Previously we had a confusing split. The
AMDGPUToolChain base class implemented much of the base
support. It was subclassed by ROCMToolChain, which would
have been more accurately described as the offloading subclass.
That was further subclassed into HIP and OpenMP specific subclasses.
Deleting those two is the important part of this change. There was
code duplication, and features arbitrarily handled in one but not
the other. The offload kind is passed in almost everywhere if you
really need to know the original language. However, I consider
this an antifeature, and it is really poor QoI to have the HIP
and OpenMP toolchains behave differently in any way. The platform
should be consistent and the driver behaviors should not depend
on the language.
There is additional mess in the handling of spirv, which this
[9 lines not shown]
Revert "Disable RelLookupTableConverter on AArch64" (#207046)
Reverts llvm/llvm-project#204669
https://github.com/ARM-software/abi-aa/blob/main/sysvabi64/sysvabi64.rst#code-models
says that text + rodata should be <2GB on AArch64 for the small code
model, so we should be able to enable RelLookupTableConverter on AArch64
small code model.
With #205963, we now properly diagnose overflows, rather than silently
truncating and miscompiling.
jail: prevent a null derefence on array parameter assignment
The same variable was used as a counter for an inner and out loop.
Add a new one for the inner loop.
PR: 283934
Reported by: crest at rlwinm.de
[lldb] Move RegisterFlags from Target to Utility (#206861)
I'm doing this so that I can move RegisterInfo from
`lldb-private-types.h` to lldbUtility. It currently has a `RegisterFlags
*` field, so having it sit in lldb-private-types.h masks the actual
layering of our data types.
I considered moving RegisterInfo into Target, but RegisterValue (in
lldbUtility) uses RegisterInfo directly. Because RegisterFlags has no
internal dependencies, it seemed better to sink that instead.