[Demangle] Allow template arguments on the type of a conversion expression
A conversion expression 'cv <type> <expression>' parsed its type with
template-argument parsing disabled, so a template template parameter or
substitution followed by template arguments, as in S1_IT0_E, was not
accepted. No <expression> starts with 'I', so there is no ambiguity.
GCC emits the same form for decltype(S1<T>().~U()); clang's own
mangling of CodeGenCXX/mangle.cpp test51 fun3 hit this and could not be
demangled.
Part of #111345.
LLM-aided
[Demangle] Parse nested template arguments in a conversion operator's type
While parsing the <type> of a conversion operator, template arguments after
a type are not consumed, because they may belong to the operator itself
(a conversion function template such as cvT_IiE). That restriction was left
on while parsing the contents of a nested <template-args>, so a substitution
inside them was not allowed to take its own template arguments. For
example, in the name of `operator std::vector<int>()`,
_ZN1AcvSt6vectorIiSaIiEEEv, the `SaIiE` (std::allocator<int>) was parsed as
the bare substitution `Sa`, and the whole name was rejected.
Template arguments nested inside an I...E always belong to their own types,
so re-enable parsing them in parseTemplateArgs. The ambiguity only exists at
the outermost level of the conversion type, which is unchanged.
GCC emits the same manglings for these operators.
Part of #111345.
LLM-aided
lang/v8-beta: update to 15.8.62.9 (Chrome 158 beta)
- Update the dependency pins from DEPS and the Temporal crates to the
versions in Chromium's third_party/rust (ICU4X 2.4).
- Adapt the PartitionAlloc zero segment patches to the new
GetWellKnownReadOnlyRegions() interface, and the d8 ASLR check to
the new guard condition.
- Disable the new ECMA-402 ICU4X backend (v8_enable_ecma402_icu4x),
which needs another Rust library built by GN. It is only used when
enabled with runtime flags, and Node builds disable it as well.
lang/v8: update to 15.7.112.23 (Chrome 157 stable)
- Sync with lang/v8-beta at 15.7.112.9; DEPS is unchanged since then.
- Shim Cursor.__eq__ in metagen for LLVM < 21, which passes None to
clang_equalCursors.
- PartitionAlloc's GetStackTop() now returns uintptr_t; adjust the
FreeBSD implementation.
[clang-cl] Omit command line and workdir in CIFF CV debug info for reproducible builds. (#205736)
The command line can contain the arguments, such as the pathes or /pathmap options,
which could break a reproducible output for the object files. In addition to
`-gcodeview-commandline` option that drops the command line from the build info,
this patch adds a new `-gcodeview-cwd` option to exclude the current working
directory from the build info of the CodeView debug info sections.
Also it links `-gno-codeview-cwd` and `-gno-codeview-commandline` options with
CL's `/Brepro` option to match (partly) compiler behaviour with MSVC.
Don't use VT's register class for an Untyped callbr output
An i128 output in an explicit register pair on SystemZ is Untyped,
which has no register class, so getRegClassFor() asserted when the
indirect target read the pair. Use VT's class only when VT has one.
Assisted-by: Claude Opus 5.5
[clang] Fix PCM lock detection when generating the global module index (#236360)
The global module index could be generated while a module was being
rebuilt because the check for .pcm.lock files never matched:
sys::path::extension() returns ".lock", not ".pcm.lock".
[RISCV] Make findVRegWithEncoding return MCRegister instead of Register. NFC (#239368)
findMatchingSuperReg returns an MCRegister and the caller assigns the
result to an MCRegister.
[CIR] Keep CIR global types visible across lowering replacements (#238698)
Preparation for one-shot conversion.
A lookup after a symbol is lowered can find the already-lowered LLVM
symbol, whose type may have been adjusted during lowering. Readers
needing the unadjusted view then answer differently depending on
lowering order, which broke self-referential globals and later globals
referencing adjusted globals.
This records each symbol's CIR type in a map built before conversion and
uses it when a lookup finds an already-lowered symbol.
Fixes the two order-dependent failures with no other test changes.
Attributor: Use an array indexed by opcode for OpcodeInstMap
This avoids a DenseMap lookup for every instruction when building the
InformationCache, and for every opcode checked by
checkForAllInstructions.
CTMark instructions:u with -attributor-enable=light changes by O3 -0.04%,
ThinLTO -0.02%. The attributor-light pass itself is 0.2-2.5% faster
(callgrind), and 1.4-7.2% faster with the other pending Attributor
compile-time changes applied.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[mlir][affine] Support Cartesian combinations of affine value maps (#228837)
Combining multi-result affine maps enables more general loop analyses. For
example, trip-count expressions can use Cartesian differences of upper and
lower bounds.
In my downstream loop scheduling use case, Cartesian sums are used to
recompute bounds, which are then materialized with affine.min or affine.max.
Add Cartesian support to AffineValueMap::combine and difference. Use it in
existing loop analysis and normalization code to remove lower-bound padding.
[flang] Ignore @process directive after column 6 in fixed source form (#237383)
The XLF @process directive must start at column 1 or after column 6 in
fixed form. Flang treats the directive as a comment line. This patch is
to handle the directive starting after column 6.
Assisted-by: IBM Bob
[ObjectYAML] Fix unchecked Error in BBAddrMap decoder (#239063)
decodePayload returns early on an invalid feature field while the
DataExtractor cursor still holds an unchecked success Error, so obj2yaml
aborts instead of reporting the error. Check the cursor right after
reading the feature field, as decodeBBAddrMapPayload does.