libcxxrt: Fix diagnostics for derived classes
In terminate_with_diagnostics the cast_to arguments were swapped, so it
always failed. The diagnostic handler produced output like "Terminating
due to uncaught exception 0x24891e08000 of type std::runtime_error".
Now, e->what() will actually be included in the output, e.g.
"Terminating due to uncaught exception 0x2bba49208000 'Model file
doesn't exist' of type std::runtime_error".
Reviewed by: dim
Event: Halifax Hackathon 202606
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57822
(cherry picked from commit 3a5c2899fc7bd0865b5aacccc3465e46e9bc6df3)
(cherry picked from commit ab1af7bd2f425147e658a32f128a56176b1de059)
vtfontcvt: Return error from write_fnt_source
Previously write_fnt_source always returned 0, silently discarding
errors. Return rv so that errors set vtfontcvt's shell exit
appropriately.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit f05fb5157ba1291ee5019bacece8d1e98ea95b35)
(cherry picked from commit a00f80731213e03bf3d0b9028a93d0be4c0df756)
libcxxrt: Fix diagnostics for derived classes
In terminate_with_diagnostics the cast_to arguments were swapped, so it
always failed. The diagnostic handler produced output like "Terminating
due to uncaught exception 0x24891e08000 of type std::runtime_error".
Now, e->what() will actually be included in the output, e.g.
"Terminating due to uncaught exception 0x2bba49208000 'Model file
doesn't exist' of type std::runtime_error".
Reviewed by: dim
Event: Halifax Hackathon 202606
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57822
(cherry picked from commit 3a5c2899fc7bd0865b5aacccc3465e46e9bc6df3)
[clang] fix getTemplateInstantiationArgs
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 template
parameter lists by storing it's own template parameter list, creating a
dedicated field for them, similar to partial specializations.
[flang][AliasAnalysis] Add opt-in getSource memoization cache (#208319)
Add an opt-in cache to fir::AliasAnalysis that memoizes getSource()
results keyed on (value, flags). Caching is off by default and turned on
via enableSourceCache(); getSource() becomes a thin wrapper over the
uncached getSourceImpl(). The cache is a frozen snapshot with no
automatic invalidation and lives no longer than the AliasAnalysis
instance, so a client enables it only for a region in which it does not
mutate IR in a way that would change a source.
Flang's LICM enables the cache on its fir::AliasAnalysis before adding
it to the mlir::AliasAnalysis aggregate: LICM only moves operations, so
getSource()'s inputs are unchanged across the hoists, and the pass
manager drops the analysis (and its cache) after the pass.
Add a unit test covering the default-off behavior, cache fill/hit, and
that disableSourceCache() clears and bypasses the cache.
Assisted-by: Cursor
[orc-rt] Apply orc_rt_log_* naming convention to Logging.h. NFC. (#208599)
orc_rt_ is the top-level C namespace and orc_rt_log_ a nested namespace
for logging. Following the C API convention, types, values, and
variables are PascalCase and functions are camelCase (as in LLVM).
[webkit.NoUncountedMemberChecker] Improve the warning text (#204557)
This PR aligns NoUncountedMemberChecker and its variant's warning
message with the new warning format in
https://github.com/llvm/llvm-project/pull/202724.
[clang] fix typo-correction for template name lookup (#208586)
Only consider candidates which are templates.
Disable spell checking for a DR test in order to not introduce noise, as
spell checking is never helpful in those.
Fixes #207498
[orc-rt] Expand 'extern "C"' guard coverage in Logging.h. NFC. (#208596)
We'll be adding more APIs here soon -- the 'extern "C"' guards should
cover the whole header.
[AMDGPU] [NFC] Init pointers, widen mask complements (#208469)
- Initialize local pointers before use, silencing uninitialized local
pointer warnings.
- Compute mask complements at 64 bits to avoid zero-extending the result
from a type to a type of greater size and dropping high bits.
[flang][OpenMP] Support lowering of metadirective (part 3)
Enable lowering of metadirectives that resolve to a loop-associated
variant such as `do`, `simd`, `parallel do`, and `do simd`. The
associated DO construct is made available to the selected variant so the
existing OpenMP loop lowering can process it. A standalone metadirective
uses the following sibling DO, and a begin/end metadirective uses the
first substantive evaluation nested in its block.
For example, when the `vendor(llvm)` selector matches, the `parallel do`
variant is lowered together with the DO loop that follows it:
```fortran
!$omp metadirective when(implementation={vendor(llvm)}: parallel do)
do i = 1, n
y(i) = a*x(i) + y(i)
end do
```
[33 lines not shown]
[lldb] Add an MCP client and asynchronous request binding (#208371)
This PR contains the groundwork to convert lldb-mcp from a naive
forwarder into a multiplexer. This requires acting both an MCP server
and MCP client.
This PR adds a new MCP Client abstraction, a thin wrapper over
MCPTransport and MCPBinder exposing the protocol's requests as typed
asynchronous calls. BindAsync hands an incoming-request handler a Reply
it may invoke later.
This PR also makes fromJSON symmetric with toJSON for
ServerCapabilities. The former only restored supportsToolsList and
silently dropped the resources, completions and logging capabilities, so
a client parsing an initialize result never saw them.
Assisted-by: Claude
[clang] fix typo-correction for template name lookup
Only consider candidates which are templates.
Disable spell checking for a DR test in order to not introduce noise,
as spell checking is never helpful in those.
Fixes #207498
[orc_rt] adding a very simple CLI flags parser in (#172987)
Adds orc_rt::CommandLineParser, a small header-only option parser in
orc-rt-utils for use by orc-rt tools that need argument handling.
Features:
- Long (--name, --name=value) and short (-n, -nvalue) options.
- Short-flag clustering (e.g. -vp9999) and "--" to terminate option
parsing, with remaining tokens collected as positionals.
- Typed values, with parse failures returning an orc_rt::Error.
- printHelp() with aligned, optionally short-name-aware output.
Values are bound to caller-owned storage supplied at registration time and
reset to their defaults on each parse().
Also adds CommandLineTest.cpp to the CoreTests unittest and fixes the
indentation of the docs subdirectory guard in orc-rt/CMakeLists.txt.
[libc++] Enable missing allocator constructors in C++11 (#204845)
LWG2210 was a patch to N2554 (C++11) which added missing
allocator-extended constructors to various containers. When LWG2210 was
implemented, the constructors were gated with C++14. However, we
normally apply LWG issue resolutions as DRs.
This patch enables these constructors in C++11 mode too.
Fixes #204843
---------
Co-authored-by: Louis Dionne <ldionne.2 at gmail.com>
Co-authored-by: A. Jiang <de34 at live.cn>