[libc] Define _POSIX_THREADS and support _SC_THREADS in sysconf (#201091)
Defined the _POSIX_THREADS macro to 202405L in unistd-macros.h for Linux
to signal POSIX thread support.
Also implemented runtime support for _SC_THREADS in sysconf, returning
_POSIX_THREADS, and added _SC_THREADS and _POSIX_THREADS to the public
unistd.yaml specification.
Added compile-time and runtime tests to verify _POSIX_THREADS definition
and sysconf(_SC_THREADS) behavior. Standardized header comments in
unistd-macros.h to conform to LLVM style.
Assisted-by: Automated tooling, human reviewed.
---------
Co-authored-by: Pavel Labath <pavel at labath.sk>
[clang-tidy] Fix crash in readability-non-const-parameter with redecls (#200178)
The check matches `VarDecls` with `hasInitializer()`, which uses
`getAnyInitializer()` and may therefore match a redeclaration whose
initializer is attached to another declaration. So calling
`IgnoreParenCasts()` on `VD->getInit()` directly would crash when that
redeclaration had no initializer of its own.
This commit fixes the problem by using a new matcher that only matches
VarDecls with an initializer on the current declaration.
Closes https://github.com/llvm/llvm-project/issues/199197
[lldb][Windows] Support OutputDebugString (#196395)
This picks https://reviews.llvm.org/D128541 back up. It implements
support for `OutputDebugStringA/W` on Windows. It's used by some logging
systems.
The main changes since the original patch:
- Use `WaitForDebugEventEx` for getting debug events over
`WaitForDebugEvent`. According to the
[docs](https://learn.microsoft.com/en-us/windows/win32/api/debugapi/nf-debugapi-waitfordebugeventex),
the only difference is that the -Ex version correctly outputs Unicode
strings.
- Support strings longer than 64 KiB. I set an arbitrary limit of 1 MiB
for the strings we read. The debugger interface only tells us the length
modulo 64 KiB which is a bit awkward. Libraries like Qt already chunk
calls to `OutputDebugString`, so strings shouldn't be too big in
practice.
- Output to stdout instead of a log channel, so the output is always
enabled. I don't know if this should go to stdout or stderr.
[8 lines not shown]
firmware: stop buffering in sed
Since cmd_output was made the generic filter for subscriptions
the update log showed signs of excessive buffering. This brings
it back to where it was and also improves the old read case.
[LLVM][SandboxVec][LoadStoreVec] Add support for vector ConstantInt/FP. (#200437)
The current implementation treats all ConstantInt/FP values as scalar,
leading to the wrong number of elements being used when combining them.
Reapply "[PDB][llvm-pdbutil] Add DXContainer support for `pdb2yaml` and `yaml2pdb`" (#201092)
This reapplies #198351 with 2 issues fixed:
- `-Wchanges-meaning` causing an error in `PdbYaml.h`
- UB when parsing DXContainer header from a null buffer, fixed in
#200865
Original patch description:
This patch enables the following:
1. Attempting to parse a `DXContainer` from stream 5 (generated by
DirectX tools) of a PDB file, to be used later in `llvm-pdbutil`.
2. Outputting a PDB file with a built in DXContainer as YAML. Existing
DirectX tools form a PDB container with empty DBI, TPI and IPI streams,
so this patch also allows them to be empty when dumping a PDB file as
YAML.
3. Creating a PDB file from YAML with an built in DXContainer. When
creating a PDB with a DXContainer, streams DBI, TPI and IPI can be
completely empty, so this patch also includes adjustments to allow
forming such a PDB file. This is done to maintain compatibility with
other DirectX tools.
[libc] Define SSIZE_MAX in limits-macros.h (#201087)
Defined SSIZE_MAX in limits-macros.h to support POSIX compliance.
Applications compiling against LLVM libc require SSIZE_MAX to be defined
in limits.h.
SSIZE_MAX is defined strictly in terms of __PTRDIFF_MAX__, matching
ssize_t defined as __PTRDIFF_TYPE__, ensuring they are always
structurally aligned and compile-time safe.
Added Doxygen comments for SSIZE_MAX.
Added SSIZE_MAX to limits.yaml and added a unit test in limits_test.cpp
to verify the definition.
Assisted-by: Automated tooling, human reviewed.
[flang][OpenMP] Store DECLARE_TARGET information in WithOmpDeclarative
This will be used to emit DECLARE_TARGET directives into module files.
When a symbol apperars in DECLARE_TARGET (explicitly or explicitly), the
OmpDeclareTarget flag will be set on it. The set of accompanying clauses
will be stored in the associated details, in the WithOmpDeclarative mixin.
The mixin was added to ObjectEntityDetails, ProcEntityDetails, and
CommonBlockDetails.
The design goal was to be able to reconstruct the appropriate DECLARE_
TARGET directive for individual symbols for the purpose of emitting it
in a module file. Simply storing and then unparsing the AST node may
include symbols that should not be emitted.
Additionally, refactor the WithOmpDeclarative printing code for reuse in
symbol dumping for debugging, and for printing clause sets.
scaleway-cli: Update to 2.56.1
pkgsrc changes:
- Enable "object" subcommands at least on NetBSD... it seems it does not have
anything specific to (darwin|linux|windows). Probably can be extended to other
Unix-like OSes.
Changes:
Too many to mention please see
<https://github.com/scaleway/scaleway-cli/releases>.
It adds several (sub)commands for new services/API, fixes bugs and
update dependencies.
[llvm] Remove unused DenseMapInfo::getTombstoneKey (#200957)
#200595 changed DenseMap to no longer create tombstone buckets, so
DenseMapInfo<T>::getTombstoneKey() is never called. Remove dead
definitions and dead tombstone branches.
[IR][Analysis] Remove unused DenseMapInfo::getTombstoneKey (#200958)
#200595 changed DenseMap to no longer create tombstone buckets, so
DenseMapInfo<T>::getTombstoneKey() is never called. Remove dead
definitions and dead tombstone branches.
[CodeGen][Transforms] Remove unused DenseMapInfo::getTombstoneKey (#200956)
#200595 changed DenseMap to no longer create tombstone buckets, so
DenseMapInfo<T>::getTombstoneKey() is never called. Remove dead
definitions and dead tombstone branches.
[Target] Remove unused DenseMapInfo::getTombstoneKey (#200955)
#200595 changed DenseMap to no longer create tombstone buckets, so
DenseMapInfo<T>::getTombstoneKey() is never called. Remove dead
definitions and dead tombstone branches.