Revert "[Clang] Enable -Wunused-template under -Wall" (#207848)
Reverts llvm/llvm-project#206123
See the Flang Runtime unit test failures, we probably should fix those
before merging this to keep buildbots green.
[Clang][HIP] Add LLVM vendored device headers for `*-llvm` triple (#203980)
Summary:
We already have the `*-llvm` vendor triple to imply a hermetic LLVM
toolchain for HIP. This adds the device portion of the headers that can
be used without a ROCm installation. These are vendored just like the
CUDA ones. Despite being HIP, these are actually generic because it onyl
uses clang builtins and the `gpuintrin` shims.
Reapply "DebugInfo: Shrink-to-fit some containers to reduce peak memory usage" (#199145) (#201160)
Starting with posting this as a draft PR to run presubmit checks to
understand what failed.
This reverts commit #199145,
effectively reapplying #198935.
[clang] Cap MS RTTI TypeDescriptor name strings like MSVC does (#206317)
On the Microsoft ABI, an RTTI TypeDescriptor stores the type's decorated
name as an inline string. Unlike symbol names, this string was never run
through the MD5 shortening that MSVC applies to over-long decorated
names. Deeply nested template types therefore produced unbounded
writable .data COMDATs: for example a type whose template arguments
contain a local lambda, whose mangled name re-spells the enclosing
template context at every level of nesting, grows exponentially with
depth. A five-level repro emitted an 82 MB object file.
Wrap the TypeDescriptor name string in the same msvc_hashing_ostream
already used for the RTTI symbol. When the name reaches the length limit
it is replaced by ??@<md5>@, mimicking MSVC. MSVC counts the leading .
of the name string toward the 4096-character limit but excludes it from
the hashed input, so the threshold here is one lower than for symbols.
Fixes #206313
[clang] Reland: fix getTemplateInstantiationArgs (#207825)
Relands https://github.com/llvm/llvm-project/pull/199528
Previous: https://github.com/llvm/llvm-project/pull/202088
This implements a new strategy for collecting the template arguments, by
relying on the qualifiers and template parameter lists to navigate the
template
context of out-of-line definitions.
This greatly simplifies the signature of that function, by removing a
bunch
of workarounds, and simpliffying a couple that weren't removed yet.
Since this now relies on qualifiers and template parameter lists,
this patch expends most of its effort making sure these are placed,
transformed and propagated to template instantiations.
Also makes the explicit specialization AST nodes stop abusing the
[5 lines not shown]
CI: move libclang python byindings tests to main CI
This removes the separate python bindings CI, which run on the GitHub free
runners and take more than one hour to build libclang.
The tests are executed instead in the monolithic pipelines,
whenever clang would be tested.
This is fine in terms of resources because all the dependencies are
built anyway, and the tests themselves take less than one second to
run on the free runners.
raw ip: fix race of two connect(2)
The historical design of sockets is that on a re-connect the disconnect is
performed at the socket layer in soconnectat(). Since SMP times this is
known to be racy and the function has appopriate comment. I missed that
in the recent change. The pr_connect method should normally expect the
socket to be already disconnected, however should be able to handle a race
where socket is actually connected. Convert the check that incorrectly
tried to handle normal path of re-connect into check that handles the
race.
Reported by: markj
Fixes: ece716c5d34728a170f1dfe1b3389c267d6ddd1e
powerpc/booke(pmap): Flash-invalidate TLB on TID rollover
When the TID rolls over on a given CPU, simply flash-invalidate the
TLB instead of walking the TLB to only invalidate the repurposed TID.
Walking 256 entries is expensive, and we'll likely be inserting a bunch
new ones anyway in the new environment, since 256 really only handles
1MB of storage, so the likelihood of other mappings continuing to exist
in the TLB when their thread owner is scheduled again is very very
small.
powerpc/pmap(booke): Fix TLB TID eviction
Fix tid_set_busy() for when `pmap` is NULL. Obviously a NULL pointer
cannot be correctly used, so I'm not sure how it worked in testing on
64-bit.