| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
PR: 283315
Tested by: tuexen
(cherry picked from commit b29842622dcb9c9c9515fc04dc5826a8717537b1)
|
| |
|
|
|
|
| |
This is a direct commit to stable/14, which does not yet default to
C++17 for most in-tree programs. In some cases, this would trigger gcc
-Wc++1[47]-extensions warnings with libc++ 21.
|
| |
|
|
|
|
|
| |
PR: 292067
MFC after: 1 month
(cherry picked from commit 8f95b8b19088bd8d73f6d14dab7afe848dfc0c35)
|
| |
|
|
|
|
|
| |
ACPICA 20250807 fixes these warnings by adding nonstring attributes, but
since ACPICA in stable/14 has not been updated for quite some time,
suppress the warning for clang >= 21 instead. Direct commit to
stable/14, since stable/15 and main already have ACPICA 20250807.
|
| |
|
|
|
|
| |
This is a direct commit to stable/14, which does not yet default to
C++17 for most in-tree programs. In some cases, this would trigger
-Wc++1[47]-extensions warnings with libc++ 21.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Thread Safety Analysis: Fix pointer handling of variables with deprecated attributes (#148974)
de10e44b6fe7 ("Thread Safety Analysis: Support warning on
passing/returning pointers to guarded variables") added checks for
passing pointer to guarded variables. While new features do not
necessarily need to support the deprecated attributes (`guarded_var`,
and `pt_guarded_var`), we need to ensure that such features do not cause
the compiler to crash.
As such, code such as this:
struct {
int v __attribute__((guarded_var));
} p;
int *g() {
return &p.v; // handleNoMutexHeld() with POK_ReturnPointer
}
Would crash in debug builds with the assertion in handleNoMutexHeld()
triggering. The assertion is meant to capture the fact that this helper
should only be used for warnings on variables (which the deprecated
attributes only applied to).
To fix, the function handleNoMutexHeld() should handle all POK cases
that apply to variables explicitly, and produce a best-effort warning.
We refrain from introducing new warnings to avoid unnecessary code bloat
for deprecated features.
Fixes: https://github.com/llvm/llvm-project/issues/140330
This fixes an assertion while building the net/openvswitch port:
"Assertion failed: ((POK == POK_VarAccess || POK == POK_VarDereference)
&& "Only works for variables"), function handleNoMutexHeld, file
/usr/src/contrib/llvm-project/clang/lib/Sema/AnalysisBasedWarnings.cpp,
line 2120.'
Reported by: cy
PR: 295101, 292067
MFC after: 1 month
(cherry picked from commit d9b272a19d39f71665b529860bfed731bcfd99f5)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
After base 966fb94cb357, this revert is no longer necessary: stdint.h
will unconditionally define macros such as `SIZE_MAX`, `UINT64_C`, and
others.
Submitted by: Nikolas Klauser <nikolasklauser@berlin.de>
MFC after: 1 month
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D56746
(cherry picked from commit 19ff93c921a9d31770bcfc194c078e7a42a5f14f)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This is because contrib/llvm-project/llvm/lib/Support/Unix/Threading.inc
attempts to use pthread_get_name_np(3) and pthread_set_name_np(3), which
are not defined on Linux.
Reported by: ivy
PR: 292067
MFC after: 1 month
(cherry picked from commit b6d823e39072daae9df4b47a15ea7142b7a55f1a)
|
| |
|
|
|
|
|
| |
PR: 292067
MFC after: 1 month
(cherry picked from commit 3cbf898fb49fe087cdcafe2745cca3f7a20f4388)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
[Headers][X86] Remove more duplicated typedefs (#153820)
They are defined in mmintrin.h
This fixes a -Werror warning in openzfs, which compiles for C99, and C99
does not allow for typedef redefinitions.
PR: 292067
MFC after: 1 month
(cherry picked from commit 20450c2e792084f06974cff9d2338e2d0406883f)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[libc++] Fix iostream size ABI break (#185839)
In #124103 we changed the size of various iostream objects, which turns
out to be ABI breaking when compiling non-PIE code.
This ABI break is safe to fix, since for any programs allocating more
memory for the iostream objects, the remaining bytes are simply unused
now.
Fixes #185724
This fixes the ABI break that causes programs that use the standard
streams to terminate in various interesting ways, usually by throwing an
unexpected std::bad_cast exception.
PR: 292067
MFC after: 1 month
(cherry picked from commit 4fc1fdd206c3db60ca521e3966f31044c7711398)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[clang] create local instantiation scope for matching template template parameters (#183219)
This fixes a bug where a partial substitution from the enclosing scope
is used to prepopulate an unrelated template argument deduction.
Fixes #181166
This fixes an expected error when building the devel/catch port.
PR: 292067
MFC after: 1 month
(cherry picked from commit 5ac874516b27474ab5b3d195544c72fb04b4b86e)
|
| |
|
|
|
|
|
| |
PR: 292067
MFC after: 1 month
(cherry picked from commit 0f15398d123a9cf02711efddf5e4040f0066c6de)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
[Clang] Fix a regression introduced by #147046 (#150893)
Static functions have an implicit object argument during deduction.
This fixes an assertion while compiling the devel/corrade port.
PR: 292067
MFC after: 1 month
(cherry picked from commit 1dfe63e4f75fa2a8c94aaf4aefaf48d164bc90db)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[Clang] Don't diagnose missing members when looking at the instantiating class template (#180725)
The perfect matching patch revealed another bug where recursive
instantiations could lead to the escape of SFINAE errors, as shown in
the issue.
Fixes https://github.com/llvm/llvm-project/issues/179118
This fixes compile errors in the www/qt5-webengine port.
PR: 292067
MFC after: 1 month
(cherry picked from commit 3fd796204fe6aa2e8a2b70bb9ea95f7497247fa3)
|
| |
|
|
|
|
|
| |
PR: 292067
MFC after: 1 month
(cherry picked from commit b99d02027a0fe2e9f9a4aeb6fa3484847ddc5a57)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[libc++] Optimize std::getline (#121346)
```
-----------------------------------------------
Benchmark old new
-----------------------------------------------
BM_getline_string 318 ns 32.4 ns
```
Move the __bump_stream() lamda in <istream> to a separate function, so
this will compile with clang 18 and lower, in C++03 mode and earlier.
PR: 292067
MFC after: 1 month
(cherry picked from commit 17f1a5e638f845e171ab4e3db2a07bf8c6ac3388)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[libc++] Fix std::make_exception_ptr interaction with ObjC (#135386)
Clang treats throwing/catching ObjC types differently from C++ types,
and omitting the `throw` in `std::make_exception_ptr` breaks ObjC
invariants about how types are thrown/caught.
Fixes #135089
Co-authored-by: Louis Dionne <ldionne.2@gmail.com>
Only use lambdas when in !defined(_LIBCPP_CXX03_LANG), so this will
compile with clang 18 and lower, in C++03 mode and earlier.
PR: 292067
MFC after: 1 month
(cherry picked from commit 987ac31018cba9f1763ad3acfb68b933f58a4c52)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
[libc++] Replace __libcpp_popcount by __builtin_popcountg (#133937)
`__libcpp_popcount` was previously used as a fallback for `__builtin_popcountg` to ensure compatibility with older compilers (Clang 18 and earlier), as `__builtin_popcountg` became available in Clang 19. Now that support for Clang 18 has been officially dropped in #130142, we can now safely replace all instances of `__libcpp_popcount` with `__builtin_popcountg` and eliminate the fallback logic.
This is part of making libc++ 21 build with clang 18.
PR: 292067
MFC after: 1 month
(cherry picked from commit 5465db314a03c11b15e00f22be1609027dfc152c)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[libc++] Remove dead implementation of is_nothrow_convertible and merge the remaining code into is_convertible.h (#137717)
We can use the `__is_nothrow_convertible` builtin unconditionally now,
which makes the implementation very simple, so there isn't much of a
need to keep a separate header around.
This is part of making libc++ 21 build with clang 18.
PR: 292067
MFC after: 1 month
(cherry picked from commit 035396ceda495f456ca570fb715b04a7fc3b25c2)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
[libc++] Simplify the implementation of remove_reference (#85207)
GCC 13 introduced the type trait `__remove_reference`. We can simplify
the implementation of `remove_reference` a bit by using it.
This is part of making libc++ 21 build with clang 18.
PR: 292067
MFC after: 1 month
(cherry picked from commit a114ece3e6158f49088b0704b4afef07040d83f3)
|
| |
|
|
|
|
|
|
|
|
|
| |
[libc++] Simplify the implementation of pointer_traits a bit (#142260)
This is part of making libc++ 21 build with clang 18.
PR: 292067
MFC after: 1 month
(cherry picked from commit bb6713d38cc0d988378394f599d81d3a83dbaf03)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[libc++] Replace __libcpp_{ctz, clz} with __builtin_{ctzg, clzg} (#133920)
`__libcpp_{ctz, clz}` were previously used as fallbacks for `__builtin_{ctzg, clzg}` to ensure compatibility with older compilers (Clang 18 and earlier), as `__builtin_{ctzg, clzg}` became available in Clang 19. Now that support for Clang 18 has been officially dropped in #130142, we can now safely replace all instances of `__libcpp_{ctz, clz}` with `__count{l,r}_zero` (which internally call `__builtin_{ctzg, clzg}` and eliminate the fallback logic.
Closes #131179.
This is part of making libc++ 21 build with clang 18.
PR: 292067
MFC after: 1 month
(cherry picked from commit 821fc643b3cad922e5438760eed9cad0d6d9b3b0)
|
| |
|
|
|
|
|
|
|
|
|
| |
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project release/21.x llvmorg-21.1.8-0-g2078da43e25a,
a.k.a. 21.1.8 release.
PR: 292067
MFC after: 1 month
(cherry picked from commit 7351d001fc7f5a77a18a102e12a3ca2cbfd6988c)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[PowerPC] need to set CallFrameSize for the pass PPCReduceCRLogicals when insert a new block (#151017)
In the [ [CodeGen] Store call frame size in
MachineBasicBlock](https://reviews.llvm.org/D156113), it mentions When a
basic block has been split in the middle of a call sequence. the call
frame size may not be zero, it need to set the setCallFrameSize for the
new MachineBasicBlock. but in the function `splitMBB(BlockSplitInfo
&BSI)` in the llvm/lib/Target/PowerPC/PPCReduceCRLogicals.cpp , it do
not setCallFrameSzie for the new MachineBasicBlock `NewMBB`, we will
setCallFrameSzie in the patch.
the patch fix the crash mention in
https://github.com/llvm/llvm-project/pull/144594#issuecomment-2993736654
This fixes "error in backend: Found 1 machine code errors" while
crypto/openssh/packet.c for PowerPC64.
PR: 292067
MFC after: 1 month
(cherry picked from commit 48c35ae6ebfc6d9a2259979d915fd3bc5d6c01db)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Otherwise, gcc will not be able to compile parts of libc++ 21 in -m32
mode, resulting in errors similar to:
In file included from /usr/src/contrib/llvm-project/libc/shared/str_to_float.h:13,
from /usr/src/contrib/llvm-project/libcxx/src/include/from_chars_floating_point.h:14,
from /usr/src/contrib/llvm-project/libcxx/src/charconv.cpp:12:
/usr/src/contrib/llvm-project/libc/src/__support/str_to_float.h: In function 'void __llvm_libc::internal::set_implicit_bit(__llvm_libc::fputil::FPBits<T>&) [with T = long double]':
/usr/src/contrib/llvm-project/libc/src/__support/str_to_float.h:77:10: error: 'struct __llvm_libc::fputil::FPBits<long double>' has no member named 'set_implicit_bit'
77 | result.set_implicit_bit(result.get_biased_exponent() != 0);
| ^~~~~~~~~~~~~~~~
PR: 292067
MFC after: 1 month
(cherry picked from commit 718e5874be0306ea302fd2b8e1d97fc79682abbe)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
[libc++] Remove dead code from <type_traits> (#143854)
Since we've upgraded to GCC 15 now, we can remove a bunch of dead code
from `<type_traits>`.
This is part of making libc++ 21 build with GCC 14.
PR: 292067
MFC after: 1 month
(cherry picked from commit f7bcd8d8c9336b97569265e5ad36b73b30357beb)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[libc++] Simplify the implementation of __libcpp_{,de}allocate (#147989)
GCC 15 also supports `__buitin_operator_{new,delete}` now, so the
`#else` cases are dead code. This patch inlines the calls to the wrapper
functions and simplifies some surrounding code.
This is part of making libc++ 21 build with GCC 14.
PR: 292067
MFC after: 1 month
(cherry picked from commit ad1f6ee5d7230a63c216cd9ad3b89d5b7d1c4a3a)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This partially reverts upstream libc++ commit aa7f377c965c:
[libc++] Remove libc++'s own stdint.h and locale.h (#107436)
These headers are not doing anything beyond the system or compiler
provided equivalent headers, so there's no real reason to keep them
around. Reducing the number of C headers we provide in libc++ simplifies
our header layering and reduces the potential for confusion when headers
are layered incorrectly.
The problem is that libc++'s own `stdint.h` _does_ do something: it
defines `__STDC_LIMIT_MACROS` and `__STDC_CONSTANT_MACROS` before
including the system `stdint.h`, causing the latter to expose macros
like `SIZE_MAX`, `UINT64_C`, and others.
If the `__STDC_LIMIT_MACROS` and `__STDC_CONSTANT_MACROS` macros are not
exposed, C++ programs compiled for standards before C++11 can fail with
errors due to those macros not being available.
PR: 292067
MFC after: 1 month
(cherry picked from commit 00bee6fcd77f7812e967f85d1cacbc349ff312b3)
|
| |
|
|
|
|
|
|
|
|
|
| |
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project release/21.x llvmorg-21.1.7-0-gcd708029e0b2,
a.k.a. 21.1.7 release.
PR: 292067
MFC after: 1 month
(cherry picked from commit e64bea71c21eb42e97aa615188ba91f6cce0d36d)
|
| |
|
|
|
|
|
|
|
| |
Fix various configuration fails, update generated headers, Makefiles, etc.
PR: 292067
MFC after: 1 month
(cherry picked from commit 770cf0a5f02dc8983a89c6568d741fbc25baa999)
|
| |
|
|
|
|
|
|
|
|
| |
This adjusts the llvmorg-21-init-19288-gface93e724f4 import: add more
items to the libc/ top-level directory.
PR: 292067
MFC after: 1 month
(cherry picked from commit bb722a7d0f1642bff6487f943ad0427799a6e5bf)
|
| |
|
|
|
|
|
|
|
|
| |
This adjusts the llvmorg-21-init-19288-gface93e724f4 import: add partial
libc/ top-level directory.
PR: 292067
MFC after: 1 month
(cherry picked from commit 8f6978f83cc64a2e644d9bdf380a6996d3acdc4b)
|
| |
|
|
|
|
|
|
|
|
| |
This adjusts the llvmorg-21-init-19288-gface93e724f4 import: add partial
third-party/ top-level directory.
PR: 292067
MFC after: 1 month
(cherry picked from commit 3f16c588d1d8c46d7025f95003602807d9c1ddb9)
|
| |
|
|
|
|
|
|
|
|
|
| |
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-21-init-19288-gface93e724f4, the
last commit before the upstream release/21.x branch was created.
PR: 292067
MFC after: 1 month
(cherry picked from commit 700637cbb5e582861067a11aaca4d053546871d2)
|
| |
|
|
|
|
|
|
|
|
| |
This reverts commit 1d99ada3215dbc28665fe051f9ccf028a2a02ce8, in
preparation for merging llvm 21.
PR: 292067
MFC after: 1 month
(cherry picked from commit 6243d755fb82e62d2a3a2e031801e0443150454a)
|
| |
|
|
|
|
|
|
|
|
| |
This reverts commit 6933315cf57fc3f505431bff7a0075df471d7453, in
preparation for merging llvm 21.
PR: 292067
MFC after: 1 month
(cherry picked from commit f3b0cac70b80116e691ad1e6daa5110186233206)
|
| |
|
|
|
|
|
|
|
|
| |
This reverts commit 2facc097b9b28a81b925c924f27f09b40f29fd4d, in
preparation for merging llvm 21.
PR: 292067
MFC after: 1 month
(cherry picked from commit 3b0a0e64bd9f0a65f0dd62dc157597e6d9ecc933)
|
| |
|
|
|
|
|
|
|
|
| |
This reverts commit 198b947ebc6834eade6acc52c5441a38693b8822, in
preparation for merging llvm 21.
PR: 292067
MFC after: 1 month
(cherry picked from commit f8152c67d4272e155460e4b3057b41924df8af1c)
|
| |
|
|
|
|
|
|
|
|
| |
This reverts commit f12b6acbe1ea1c425c0e21d80097115e4ad33017, in
preparation for merging llvm 21.
PR: 292067
MFC after: 1 month
(cherry picked from commit 1f9c1cd08dba0c46c1e1cea43b3bbea23af4fbaa)
|
| |
|
|
|
|
|
|
|
|
| |
This reverts commit cab3680acf8e6ea40c686d4f26db4429e26a5331, in
preparation for merging llvm 21.
PR: 292067
MFC after: 1 month
(cherry picked from commit 501871ebf9d725ab1c6fb2c4da9bac77f60b37a7)
|
| |
|
|
|
|
|
|
|
|
| |
This reverts commit f7570f1eb0dc056dfce9d7500157538c670edaf6, in
preparation for merging llvm 21.
PR: 292067
MFC after: 1 month
(cherry picked from commit a843ea3f246f3f137722db556aa07710e6a84b71)
|
| |
|
|
|
|
|
|
|
|
| |
This reverts commit 267fa9ab814c23ca97b8b7e1740f4da51485ac72, in
preparation for merging llvm 21.
PR: 292067
MFC after: 1 month
(cherry picked from commit 3ac42330b1da72d68cc6d7c3f65e24a882ccfd47)
|
| |
|
|
|
|
|
|
|
|
| |
This reverts commit a7455c47801ea1e4c4eed10cab2072375f6f92a2, in
preparation for merging llvm 21, in preparation for merging llvm 21.
PR: 292067
MFC after: 1 month
(cherry picked from commit 3ca6facafc4c96fa9d6027b6f3b50b7c3e3a5dbf)
|
| |
|
|
|
|
|
|
|
|
| |
This reverts commit fd17362f6225085e60eabed8af7421838100b457, in
preparation for merging llvm 21.
PR: 292067
MFC after: 1 month
(cherry picked from commit a24406d2e0e8eee8db03ed8d1ae7fb482cf912ab)
|
| |
|
|
|
|
|
|
|
|
| |
This reverts commit 2b3703a4f4519e202c3bdf12e7e13d9b5fdbc3f3, in
preparation for merging llvm 21.
PR: 292067
MFC after: 1 month
(cherry picked from commit 3f6219840dbea7712554982a3c9f852c1c9664f4)
|
| |
|
|
|
|
|
|
|
|
| |
This reverts commit 8ad38d5eb3985ef778a7d36093878b0b373ccedf, in
preparation for merging llvm 21.
PR: 292067
MFC after: 1 month
(cherry picked from commit d6d48190ec6a62a20ef603011f215015c1d999fb)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
by reverts"
This reverts commit caf0ccccc304e3e7938c9722f1deb0a362fd70d5, in
preparation for merging llvm 21.
PR: 292067
MFC after: 1 month
(cherry picked from commit 5945da0bc9ac42f531b1079a246eb8ce4f0d63db)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is required for LLVM 22's ld.lld to avoid a build error:
ld.lld: error: section '.text' address (0x38000) is smaller than image base (0x10000000); specify --image-base
ld.lld: error: section '.rodata' address (0x3b308) is smaller than image base (0x10000000); specify --image-base
ld.lld: error: section '.data' address (0x3b610) is smaller than image base (0x10000000); specify --image-base
ld.lld: error: section '.bss' address (0x3f618) is smaller than image base (0x10000000); specify --image-base
Use 0x38000 for the image base, which is the address of the lowest
(and only) LOAD segment in the file.
Sponsored by: https://www.patreon.com/bsdivy
Differential Revision: https://reviews.freebsd.org/D56459
(cherry picked from commit aa0bc7cca153f67f8becec8a8fb259ff5fd30fd0)
(cherry picked from commit ee58056e1e42de9230a159412827da97ae7f03bc)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since this original comment was written, the actual issue in SLOF
was diagnosed and documented in commit 424089a0fc, which fixed it
for loader(8). Update the comment in boot1 to be more informative
to future readers.
MFC after: 3 days
Reviewed by: jhibbits, adrian
Sponsored by: https://www.patreon.com/bsdivy
Differential Revision: https://reviews.freebsd.org/D56470
(cherry picked from commit eb0279550d52962241b4178101cd7f7d732eb682)
(cherry picked from commit 66f55b90b6bcbbf3c26b2da7f56d17052e39018f)
|