[NFC][DSE][DebugInfo] Say what an empty fragment intersect means (#216123)
calculateFragmentIntersect leaves NewFragment empty when the intersect
covers
everything the record describes, which is an answer rather than a
failure. The
comment here only described the failure, so the case where the dead
slice
covers the whole thing read as something having gone wrong.
[clang] Fix crash on implicit conversion of a reference NTTP bound to a subobject (#215900)
A non-type template parameter of pointer or reference type is substituted
with a ConstantExpr wrapping an OpaqueValueExpr that has no source
expression, see BuildExpressionFromNonTypeTemplateArgumentValue().
When such a parameter appears in a context that needs an implicit
conversion, the -Wconversion machinery inspects the expression, and
TryGetExprRange() recursed into OpaqueValueExpr::getSourceExpr() without
checking for null. The recursive call then dereferenced null in
Expr::IgnoreParens():
struct S { static bool arr[2]; };
bool S::arr[2];
template <bool &Ref> int f() { return Ref; }
int g() { return f<S::arr[1]>(); }
Only recurse when there is a source expression, matching what
CheckImplicitConversion() already does for OpaqueValueExpr, and otherwise
fall back to the range of the expression's type.
[libc][Semaphore] Add public sem_t type and entry (#213489)
fix #190847
Add the public `sem_t` class that operates on the internal `Semaphore`
class.
Assisted-by: Claude Code Fable 5.
www/{nginx,nginx-devel,freenginx}: 3rd-party modules management
Start moving the bundled 3rd-party modules into dedicated
nginx-module-* ports, so that module versions are maintained in a
single place instead of the GH_TUPLE lists of the nginx ports.
As a first step, convert www/nginx-module-lua into a hybrid port
that installs the lua-nginx-module sources next to the prebuilt
DSO and use them in the three nginx ports via an unversioned
BUILD_DEPENDS instead of fetching from GitHub.
Sponsored by: Netzkommune GmbH
[docs] Finish MyST migration for selected Clang docs (#214617)
Tracking issue: #201242
See the [migration guide] for more information.
[migration guide]:
https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines
This is a stacked PR based on #214615 , which will be a standalone
commit that
renames *.rst -> *.md before this PR lands for history preservation
purposes.
This was prepared with rst2myst plus LLM-assisted cleanup. I paged
through all the generated HTML looking for migration artifacts, and all
of the differences I could find appear to be formatting error
corrections.
[docs] Rename selected Clang docs to Markdown (#214615)
Tracking issue: #201242
See the [migration guide] for more information.
[migration guide]:
https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines
This is the initial straight rename commit. It will probably break the
docs build, but it has to be a separate PR for blame preservation
purposes.
[WebAssembly] Fix __init_tls_base global in coop threading (#208597)
This commit updates how `wasm-ld` initializes the `__init_tls_base`
global during module instantiation. Previously this global was left
entirely unmodified meaning that it was always 0. This change updates
the `__wasm_init_memory` function to set this global dynamically in PIC
mode based on the TLS address calculation, or in non-PIC mode the
generation of `__wasm_init_memory` correctly sets it to the desired TLS
address.
cc https://github.com/WebAssembly/wasi-libc/issues/819
[CIR] Stop skipping an indirect cir.try_call in callconv lowering (#214983)
x86_64 calling-convention lowering lowers a callee's signature while
leaving an indirect `cir.try_call` to that callee in the form it was
written in hand-written CIR.
Now the `try_call` reaches the call-site rewriter, which reports it
because it cannot rebuild a `cir.try_call` yet.
Assisted-by: Cursor / claude-opus-5
lang/go126: Update to 1.26.6
Changes:
go1.26.6 (released 2026-08-13) includes security fixes to the go
command, and the crypto/tls, encoding/asn1, encoding/xml,
html/template, net, net/http, and net/url packages, as well as bug
fixes to the compiler, the linker, the runtime, and the crypto/tls and
os packages.
MFH: 2026Q3
(cherry picked from commit 50449ba010d62b32cecd550e9835f6322c34ad6e)
lang/go125: Update to 1.25.13
Changes:
go1.25.13 (released 2026-08-13) includes security fixes to the go
command, and the crypto/tls, encoding/asn1, encoding/xml,
html/template, net/http, and net/url packages, as well as bug fixes to
the compiler, the runtime, and the crypto/tls and os packages.
MFH: 2026Q3
(cherry picked from commit 7f0862a40fff405f30c9becdacf75b8716ff3179)
lang/go126: Update to 1.26.6
Changes:
go1.26.6 (released 2026-08-13) includes security fixes to the go
command, and the crypto/tls, encoding/asn1, encoding/xml,
html/template, net, net/http, and net/url packages, as well as bug
fixes to the compiler, the linker, the runtime, and the crypto/tls and
os packages.
MFH: 2026Q3
lang/go125: Update to 1.25.13
Changes:
go1.25.13 (released 2026-08-13) includes security fixes to the go
command, and the crypto/tls, encoding/asn1, encoding/xml,
html/template, net/http, and net/url packages, as well as bug fixes to
the compiler, the runtime, and the crypto/tls and os packages.
MFH: 2026Q3
[CIR] Search the feature list once and assert on multiversioning
Review feedback on #215118.
funcAvxLevel walked the whole feature list once per name and was called
twice, so it now makes a single pass.
It also has no equivalent of the `hasAttr<TargetAttr>()` gate classic
uses. A multiversioned function's feature list carries the same `+avx`
entry a plain `target` attribute produces, so this would take a raised
level where classic keeps the module's. CIRGen rejects multiversioning
today, so an assert on opFuncMultiVersioning marks the gate that has to
go in when that changes.
Comments naming a function or file in classic CodeGen came out. They go
stale when that code moves, and one already had, claiming a declaration
carries no features. x86TargetAttrAvx is now allowsX86TargetAttrAvx,
after the function that produces it.
Assisted-by: Cursor / claude-opus-5
[CIR] Drop the call-conv lowering flag from the AVX test
The AVX test this branch adds asks for the pass with
`-clangir-enable-call-conv-lowering`, which no longer exists now that
this branch has picked up #215026 and #215117. The pass runs by
default, so the RUN lines do not need a flag at all and get the same
lowering without one.
Assisted-by: Cursor / claude-opus-5
[CIR] Accept fixed-width vectors in x86_64 callconv lowering
The CallConvLowering bridge rejects a vector in a parameter or return position,
so a function taking one fails the pass. It also never reads the AVX level,
which is what decides whether a vector wider than 128 bits reaches a register.
A vector is accepted now where the classifier and clang size it the same way,
which means a whole-byte element and a power-of-two width. Scalable vectors and
the other widths stay rejected. The module's AVX level comes from the target
ABI name, as CodeGenModule does. A classifier per level lets a target attribute
raise it for one function. An ABI older than the rule pins every function back
to the module's level. A direct call takes its callee's level, and an indirect
call the level of the function containing it.
CIRGen records target features on a definition but not on a declaration, so a
declaration carrying the attribute is classified at the module's level until
Assisted-by: Cursor / claude-opus-5
[LLVMOffload] Fix LLVMOffload tests from running on Intel in #212373 (#216187)
Offloading via LLVM currently does not support Intel GPUs, this disables
running the tests for them.
Fixes the buildbot error from #212373
[SLP]Release copyable operand deps on duplicate parent-phi lanes
Non-scheduled entries feeding a phi may repeat a def across lanes. The
scheduler skipped duplicate parent-phi user lanes entirely, so per-column
copyable scheduling data was never released and the copyable bundles never
became ready.
Fixes #216146
Reviewers:
Pull Request: https://github.com/llvm/llvm-project/pull/216186
Use static_pointer_cast to do SyntheticChildrenSP -> ScriptedSyntheticChildrenSP (#216181)
FormatManager::GetSyntheticForType was taking a pointer out one shared
pointer and making a new shared pointer referring to it which messes up
the lifecycle of the object.
This is just a little thinko from the original implementation. We do the
same thing in several other places in the TypeCategory, etc. and it's
done correctly in all the other places.
I'm not adding a test here because trying to guess what you have to do
to cause one or the other shared_pointer to get their reference count to
0 isn't particularly stable.
The testing for SBTypeSynthetic is pretty minimal - it would be better
to write a complete test for this class, which would have tripped this.
But that's a bigger task, and I want to get this obvious crasher fix in
now.
[2 lines not shown]
[X86] Use a large-model call for __tls_get_addr
The x86-64 ELF TLSGD and TLSLD sequences currently use a PLT32 call
to __tls_get_addr for every code model. The call can overflow in the
large code model when the PLT is more than 2 GiB away.
Use the same relocation strategy as GCC for large-model PIC: materialize
the GOT base with GOTPC64, materialize __tls_get_addr with PLTOFF64, and
call it indirectly. This changes only x86-64 LP64 ELF PIC code using
the large code model.
Assisted-by: Codex
[DWARFLinker] Keep address-independent block attributes in the type unit (#215932)
cloneBlockAttr dropped every block and exprloc attribute whose DIE was
placed in the artificial type unit. The intent was to discard location
expressions that resolve against a single origin compile unit, since a
type unit is shared by every unit referencing the type, but the check
was incorrectly applied to all block-form attributes.
Clang encodes DW_AT_data_member_location as DW_FORM_block1 at DWARF 2
and as a constant from DWARF 3 onward, so at DWARF 2 every member and
inheritance offset of a deduplicated record collapsed to zero. This
caused LLDB to crash when trying to build types using the wrong offsets,
but that's a separate issue.
Drop only expressions that carry a target address or reference a base
type DIE, which are the cases the type unit cannot resolve.
[lld][ELF][x86-64] Do not relax large-model TLS sequences
GCC uses an indirect PLTOFF64 call to __tls_get_addr for large-model
TLSGD and TLSLD sequences. These sequences do not match the fixed-size
psABI templates that lld rewrites when relaxing TLS to IE or LE.
Detect the PLTOFF64 relocation following TLSGD or TLSLD and preserve the
original sequence instead of rewriting unrelated instruction bytes.
Assisted-by: Codex
[RISCV] Support -march=native (#215939)
-march=native is how to do a native compilation on X86 so it is included in the
build scripts of many projects. ARM and AArch64 also support this
probably for compatibility with X86.
This patch does the same for RISC-V. If -march=native is provided by
itself, I treat it like -mcpu=native. If -mcpu is also provided then the
-mcpu will be used only for -mtune and the ISA string will derive from
the host CPU.
Assisted-by: Claude