[FoldingSet] Add typed lookup/insert/erase/getOrInsert (#219644)
FindNodeOrInsertPos hands the insertion state to InsertNode as a `void *`:
any pointer converts to it, only a comment says where it may come from,
and since the switch to linear probing the value is the node's hash, not
a position at all.
Carry it in FoldingSetInsertToken instead, the hash wrapped in a type
whose constructor and accessor are private to FoldingSetBase, with
NotAHash as the no-token state. The `void *` overloads remain,
forwarding to the typed ones, until their callers are migrated.
LLM-aided
[SSAF][clang-reforge] Add end-to-end clang-reforge tests
- Make CppBoundedBuffers adapt to flattened WPA results;
- Let CppBoundedBuffers use qualified EntityNames so that it can
associate ASTNodes with WPA results;
- Add end-to-end tests
Final step of:
rdar://185840466
[SSAF] Flatten 'UnsafeBufferReachableAnalysisResult' to a plain set
Previously, an 'UnsafeBufferReachableAnalysisResult' was organized as
a map from contributors to their mutually exclusive
sub-results. Because this extra layer of contributor information
proved unnecessary, this commit flattens the result into a plain set.
The source transformation expects the result to be a plain set, so
this is a prerequisite step for
rdar://185840466
[SSAF] Add APIs for resolving bare EntityNames to qualified EntityNames
Also give Transformation access to SSAFOptions so that it can use
link-unit and compilation-unit IDs to resolve bare EntityNames.
first step of
rdar://185840466
[SSAF][SourceTransform] Add '--ssaf-link-unit-id=' for specifying link unit IDs (#218823)
The source-transformation pass takes WPA results as input, where
entities are named under link-unit and compilation-unit namespaces. To
associate ASTNodes with entities, the source-transformation pass needs
to know both link-unit and compilation-unit IDs. Such information is
provided by the caller.
rdar://185818153
[flang][Semantics] Resolve private PDT binding overrides (#218832)
Use the selected binding declaration owner when determining the module
in which a private binding may be overridden. A generic cloned into a
PDT instantiation is owned by the instantiation scope, which can
otherwise cause a legal same-module override to be skipped.
Add coverage for external, unrelated-module, module-owned, use-renamed,
and cross-module private/public PDT cases.
Fixes #218683
Assisted-by: AI
[dsymutil] Fix cross-container iterator comparison in MachODebugMapParser (#219370)
This patch fixes a cross-container iterator comparison in
handleStabSymbolTableEntry.
Without this patch, ObjectSymIt starts as an iterator into
CurrentObjectAddresses. If alias lookup succeeds, ObjectSymIt is
assigned AliasIt, an iterator into CurrentObjectAliasMap:
auto AliasIt = CurrentObjectAliasMap.find(Name);
if (AliasIt != CurrentObjectAliasMap.end())
ObjectSymIt = AliasIt;
Subsequent checks then evaluate:
if (ObjectSymIt == CurrentObjectAddresses.end())
which compares an iterator from CurrentObjectAliasMap against the end of
CurrentObjectAddresses.
[7 lines not shown]
[flang][test] Extend coverage for procedure-valued function results (#219477)
Follow-up test coverage for #216322, which fixed `IsProcedure()` for
references to functions whose result is a plain procedure — a shape that
previously aborted a production build on the `CHECK(IsProcedure(expr) ||
IsProcedurePointer(expr))` in intrinsic argument checking instead of
reporting the declaration error flang had already recorded.
The tests that landed with that fix reference the callee directly and
recursively (`func-proc-result.f90`) or vary the intrinsic
(`func-proc-result-intrinsics.f90`). This adds the two dimensions they
leave uncovered.
Assisted-by: AI
dpaa/fman_xmdio: Make xmdio a "real" MDIO
Instead of forcing an `mdio` pseudo-device to hang off the xmdio, rename
xmdio to "mdio" and make it an ofw bus device, akin to the mii_fdt
driver, so that children can get the device tree goodies.
dpaa/fman: Pad the qman channel search array
The loop goes over the qman channel total (16), so if a port ID is not
found in the list it could walk off the end of the list and return
garbage. Not a problem in practice, as only valid ports are included in
our device trees, but protect it anyway.
[ADT] Add DebugEpochBase::HandleBase::isComparableWith (#219738)
This patch unifies operator== across hash table iterators with
DebugEpochBase::HandleBase::isComparableWith, performing the following
safety checks:
- LHS is either default-constructed or in sync with its container.
- RHS is likewise either default-constructed or in sync with its
container.
- Both iterators belong to the same container instance and share the
same state (without intervening mutations).
Assisted-by: Antigravity
ntb_hw_plx.4: Canonicalize
+ tag SPDX
+ canonicalize SYNOPSIS, LOADER TUNABLES, and HARDWARE
+ switch X to %d for clarity and consistency
MFC after: 3 days