git: e40599641e0e - stable/15 - Merge llvm-project release/21.x llvmorg-21.1.8-0-g2078da43e25a
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 29 May 2026 23:01:53 UTC
The branch stable/15 has been updated by dim:
URL: https://cgit.FreeBSD.org/src/commit/?id=e40599641e0e6e6f35cb46e5b2f3e17db10e54ed
commit e40599641e0e6e6f35cb46e5b2f3e17db10e54ed
Author: Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2026-01-10 15:55:44 +0000
Commit: Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2026-05-29 22:57:31 +0000
Merge llvm-project release/21.x llvmorg-21.1.8-0-g2078da43e25a
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)
---
.../clang/lib/ExtractAPI/DeclarationFragments.cpp | 5 ++++-
.../clang/lib/Format/QualifierAlignmentFixer.cpp | 17 +++++++++++++----
.../clang/lib/Format/UnwrappedLineParser.cpp | 8 ++++----
.../llvm-project/clang/lib/Format/WhitespaceManager.cpp | 5 ++++-
.../lib/sanitizer_common/sanitizer_linux.cpp | 12 ++++++++++--
.../sanitizer_common/sanitizer_platform_limits_posix.h | 2 +-
contrib/llvm-project/libcxx/include/__config | 2 +-
.../llvm-project/llvm/lib/CodeGen/SelectOptimize.cpp | 2 +-
.../Target/WebAssembly/WebAssemblyExplicitLocals.cpp | 14 ++++++++++++++
.../lib/Target/WebAssembly/WebAssemblyRegStackify.cpp | 4 ++++
.../Transforms/Instrumentation/RealtimeSanitizer.cpp | 3 +++
lib/clang/include/VCSVersion.inc | 6 +++---
lib/clang/include/clang/Basic/Version.inc | 6 +++---
lib/clang/include/lld/Common/Version.inc | 2 +-
lib/clang/include/lldb/Version/Version.inc | 6 +++---
lib/clang/include/llvm/Config/config.h | 4 ++--
lib/clang/include/llvm/Config/llvm-config.h | 4 ++--
lib/clang/include/llvm/Support/VCSRevision.h | 2 +-
18 files changed, 74 insertions(+), 30 deletions(-)
diff --git a/contrib/llvm-project/clang/lib/ExtractAPI/DeclarationFragments.cpp b/contrib/llvm-project/clang/lib/ExtractAPI/DeclarationFragments.cpp
index 791afc1a9757..00138c14ddcc 100644
--- a/contrib/llvm-project/clang/lib/ExtractAPI/DeclarationFragments.cpp
+++ b/contrib/llvm-project/clang/lib/ExtractAPI/DeclarationFragments.cpp
@@ -636,7 +636,10 @@ DeclarationFragmentsBuilder::getFragmentsForParam(const ParmVarDecl *Param) {
DeclarationFragments::FragmentKind::InternalParam);
} else {
Fragments.append(std::move(TypeFragments));
- if (!T->isAnyPointerType() && !T->isBlockPointerType())
+ // If the type is a type alias, append the space
+ // even if the underlying type is a pointer type.
+ if (T->isTypedefNameType() ||
+ (!T->isAnyPointerType() && !T->isBlockPointerType()))
Fragments.appendSpace();
Fragments
.append(Param->getName(),
diff --git a/contrib/llvm-project/clang/lib/Format/QualifierAlignmentFixer.cpp b/contrib/llvm-project/clang/lib/Format/QualifierAlignmentFixer.cpp
index 441a37a4902b..cc59dbd13621 100644
--- a/contrib/llvm-project/clang/lib/Format/QualifierAlignmentFixer.cpp
+++ b/contrib/llvm-project/clang/lib/Format/QualifierAlignmentFixer.cpp
@@ -182,8 +182,11 @@ const FormatToken *LeftRightQualifierAlignmentFixer::analyzeRight(
// We only need to think about streams that begin with a qualifier.
if (Tok->isNot(QualifierType))
return Tok;
+
+ const auto *Next = Tok->getNextNonComment();
+
// Don't concern yourself if nothing follows the qualifier.
- if (!Tok->Next)
+ if (!Next)
return Tok;
// Skip qualifiers to the left to find what preceeds the qualifiers.
@@ -247,9 +250,15 @@ const FormatToken *LeftRightQualifierAlignmentFixer::analyzeRight(
}();
// Find the last qualifier to the right.
- const FormatToken *LastQual = Tok;
- while (isQualifier(LastQual->getNextNonComment()))
- LastQual = LastQual->getNextNonComment();
+ const auto *LastQual = Tok;
+ for (; isQualifier(Next); Next = Next->getNextNonComment())
+ LastQual = Next;
+
+ if (!LastQual || !Next ||
+ (LastQual->isOneOf(tok::kw_const, tok::kw_volatile) &&
+ Next->isOneOf(Keywords.kw_override, Keywords.kw_final))) {
+ return Tok;
+ }
// If this qualifier is to the right of a type or pointer do a partial sort
// and return.
diff --git a/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp b/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp
index 934605733542..3df071a197c6 100644
--- a/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp
+++ b/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp
@@ -2385,17 +2385,17 @@ bool UnwrappedLineParser::tryToParseLambdaIntroducer() {
const FormatToken *LeftSquare = FormatTok;
nextToken();
if (Previous) {
+ const auto *PrevPrev = Previous->getPreviousNonComment();
+ if (Previous->is(tok::star) && PrevPrev && PrevPrev->isTypeName(LangOpts))
+ return false;
if (Previous->closesScope()) {
// Not a potential C-style cast.
if (Previous->isNot(tok::r_paren))
return false;
- const auto *BeforeRParen = Previous->getPreviousNonComment();
// Lambdas can be cast to function types only, e.g. `std::function<int()>`
// and `int (*)()`.
- if (!BeforeRParen || !BeforeRParen->isOneOf(tok::greater, tok::r_paren))
+ if (!PrevPrev || !PrevPrev->isOneOf(tok::greater, tok::r_paren))
return false;
- } else if (Previous->is(tok::star)) {
- Previous = Previous->getPreviousNonComment();
}
if (Previous && Previous->Tok.getIdentifierInfo() &&
!Previous->isOneOf(tok::kw_return, tok::kw_co_await, tok::kw_co_yield,
diff --git a/contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp b/contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp
index cc3cc0f6906c..ecc696c53922 100644
--- a/contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp
+++ b/contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp
@@ -1295,7 +1295,10 @@ void WhitespaceManager::alignArrayInitializers() {
bool FoundComplete = false;
for (unsigned InsideIndex = ChangeIndex + 1; InsideIndex < ChangeEnd;
++InsideIndex) {
- if (Changes[InsideIndex].Tok == C.Tok->MatchingParen) {
+ const auto *Tok = Changes[InsideIndex].Tok;
+ if (Tok->is(tok::pp_define))
+ break;
+ if (Tok == C.Tok->MatchingParen) {
alignArrayInitializers(ChangeIndex, InsideIndex + 1);
ChangeIndex = InsideIndex + 1;
FoundComplete = true;
diff --git a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
index 16caf699a4c2..ea5f2e8f8e02 100644
--- a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
+++ b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
@@ -1287,7 +1287,7 @@ uptr GetPageSize() {
uptr ReadBinaryName(/*out*/ char *buf, uptr buf_len) {
# if SANITIZER_HAIKU
- int cookie = 0;
+ int32_t cookie = 0;
image_info info;
const char *argv0 = "<UNKNOWN>";
while (get_next_image_info(B_CURRENT_TEAM, &cookie, &info) == B_OK) {
@@ -1987,7 +1987,10 @@ SignalContext::WriteFlag SignalContext::GetWriteFlag() const {
# elif SANITIZER_NETBSD
uptr err = ucontext->uc_mcontext.__gregs[_REG_ERR];
# elif SANITIZER_HAIKU
- uptr err = ucontext->uc_mcontext.r13;
+ uptr err = 0; // FIXME: ucontext->uc_mcontext.r13;
+ // The err register was added on the main branch and not
+ // available with the current release. To be reverted later.
+ // https://github.com/haiku/haiku/commit/11adda21aa4e6b24f71a496868a44d7607bc3764
# elif SANITIZER_SOLARIS && defined(__i386__)
const int Err = 13;
uptr err = ucontext->uc_mcontext.gregs[Err];
@@ -2617,6 +2620,11 @@ static void GetPcSpBp(void *context, uptr *pc, uptr *sp, uptr *bp) {
*pc = ucontext->uc_mcontext.mc_eip;
*bp = ucontext->uc_mcontext.mc_ebp;
*sp = ucontext->uc_mcontext.mc_esp;
+# elif SANITIZER_HAIKU
+ ucontext_t *ucontext = (ucontext_t *)context;
+ *pc = ucontext->uc_mcontext.eip;
+ *bp = ucontext->uc_mcontext.ebp;
+ *sp = ucontext->uc_mcontext.esp;
# else
ucontext_t *ucontext = (ucontext_t *)context;
# if SANITIZER_SOLARIS
diff --git a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
index bfb3d5036522..ba1b9e194497 100644
--- a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
+++ b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
@@ -630,7 +630,7 @@ typedef unsigned long __sanitizer_sigset_t;
# elif SANITIZER_APPLE
typedef unsigned __sanitizer_sigset_t;
# elif SANITIZER_HAIKU
-typedef unsigned long __sanitizer_sigset_t;
+typedef unsigned long long __sanitizer_sigset_t;
# elif SANITIZER_LINUX
struct __sanitizer_sigset_t {
// The size is determined by looking at sizeof of real sigset_t on linux.
diff --git a/contrib/llvm-project/libcxx/include/__config b/contrib/llvm-project/libcxx/include/__config
index d6c6e6a08c08..699e195da2e0 100644
--- a/contrib/llvm-project/libcxx/include/__config
+++ b/contrib/llvm-project/libcxx/include/__config
@@ -28,7 +28,7 @@
// _LIBCPP_VERSION represents the version of libc++, which matches the version of LLVM.
// Given a LLVM release LLVM XX.YY.ZZ (e.g. LLVM 17.0.1 == 17.00.01), _LIBCPP_VERSION is
// defined to XXYYZZ.
-# define _LIBCPP_VERSION 210107
+# define _LIBCPP_VERSION 210108
# define _LIBCPP_CONCAT_IMPL(_X, _Y) _X##_Y
# define _LIBCPP_CONCAT(_X, _Y) _LIBCPP_CONCAT_IMPL(_X, _Y)
diff --git a/contrib/llvm-project/llvm/lib/CodeGen/SelectOptimize.cpp b/contrib/llvm-project/llvm/lib/CodeGen/SelectOptimize.cpp
index 13ed8f28d550..2052e9a75d89 100644
--- a/contrib/llvm-project/llvm/lib/CodeGen/SelectOptimize.cpp
+++ b/contrib/llvm-project/llvm/lib/CodeGen/SelectOptimize.cpp
@@ -502,7 +502,7 @@ static Value *getTrueOrFalseValue(
} else {
assert((isa<AShrOperator>(AuxI) || isa<SExtInst>(AuxI)) &&
"Unexpected opcode");
- CBO->setOperand(CondIdx, ConstantInt::get(CBO->getType(), -1));
+ CBO->setOperand(CondIdx, ConstantInt::getAllOnesValue(CBO->getType()));
}
unsigned OtherIdx = 1 - CondIdx;
diff --git a/contrib/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp b/contrib/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
index e6486e247209..5c3127e2d3dc 100644
--- a/contrib/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
@@ -216,6 +216,18 @@ static MachineInstr *findStartOfTree(MachineOperand &MO,
return Def;
}
+// FAKE_USEs are no-ops, so remove them here so that the values used by them
+// will be correctly dropped later.
+static void removeFakeUses(MachineFunction &MF) {
+ SmallVector<MachineInstr *> ToDelete;
+ for (auto &MBB : MF)
+ for (auto &MI : MBB)
+ if (MI.isFakeUse())
+ ToDelete.push_back(&MI);
+ for (auto *MI : ToDelete)
+ MI->eraseFromParent();
+}
+
bool WebAssemblyExplicitLocals::runOnMachineFunction(MachineFunction &MF) {
LLVM_DEBUG(dbgs() << "********** Make Locals Explicit **********\n"
"********** Function: "
@@ -226,6 +238,8 @@ bool WebAssemblyExplicitLocals::runOnMachineFunction(MachineFunction &MF) {
WebAssemblyFunctionInfo &MFI = *MF.getInfo<WebAssemblyFunctionInfo>();
const auto *TII = MF.getSubtarget<WebAssemblySubtarget>().getInstrInfo();
+ removeFakeUses(MF);
+
// Map non-stackified virtual registers to their local ids.
DenseMap<unsigned, unsigned> Reg2Local;
diff --git a/contrib/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp b/contrib/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp
index bc91c6424b63..fd13ef9a1921 100644
--- a/contrib/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp
@@ -866,6 +866,10 @@ bool WebAssemblyRegStackify::runOnMachineFunction(MachineFunction &MF) {
if (Insert->isDebugValue())
continue;
+ // Ignore FAKE_USEs, which are no-ops and will be deleted later.
+ if (Insert->isFakeUse())
+ continue;
+
// Iterate through the inputs in reverse order, since we'll be pulling
// operands off the stack in LIFO order.
CommutingState Commuting;
diff --git a/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/RealtimeSanitizer.cpp b/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/RealtimeSanitizer.cpp
index 5ef6ffb58a7c..667fdb746175 100644
--- a/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/RealtimeSanitizer.cpp
+++ b/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/RealtimeSanitizer.cpp
@@ -90,6 +90,9 @@ PreservedAnalyses RealtimeSanitizerPass::run(Module &M,
[&](Function *Ctor, FunctionCallee) { appendToGlobalCtors(M, Ctor, 0); });
for (Function &F : M) {
+ if (F.empty())
+ continue;
+
if (F.hasFnAttribute(Attribute::SanitizeRealtime))
runSanitizeRealtime(F);
diff --git a/lib/clang/include/VCSVersion.inc b/lib/clang/include/VCSVersion.inc
index a8d79080c301..b664ab391f4f 100644
--- a/lib/clang/include/VCSVersion.inc
+++ b/lib/clang/include/VCSVersion.inc
@@ -1,8 +1,8 @@
-#define LLVM_REVISION "llvmorg-21.1.7-0-gcd708029e0b2"
+#define LLVM_REVISION "llvmorg-21.1.8-0-g2078da43e25a"
#define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git"
-#define CLANG_REVISION "llvmorg-21.1.7-0-gcd708029e0b2"
+#define CLANG_REVISION "llvmorg-21.1.8-0-g2078da43e25a"
#define CLANG_REPOSITORY "https://github.com/llvm/llvm-project.git"
-#define LLDB_REVISION "llvmorg-21.1.7-0-gcd708029e0b2"
+#define LLDB_REVISION "llvmorg-21.1.8-0-g2078da43e25a"
#define LLDB_REPOSITORY "https://github.com/llvm/llvm-project.git"
diff --git a/lib/clang/include/clang/Basic/Version.inc b/lib/clang/include/clang/Basic/Version.inc
index aae0d61e886b..dc2a7e5c7683 100644
--- a/lib/clang/include/clang/Basic/Version.inc
+++ b/lib/clang/include/clang/Basic/Version.inc
@@ -1,9 +1,9 @@
-#define CLANG_VERSION 21.1.7
-#define CLANG_VERSION_STRING "21.1.7"
+#define CLANG_VERSION 21.1.8
+#define CLANG_VERSION_STRING "21.1.8"
#define CLANG_VERSION_MAJOR 21
#define CLANG_VERSION_MAJOR_STRING "21"
#define CLANG_VERSION_MINOR 1
-#define CLANG_VERSION_PATCHLEVEL 7
+#define CLANG_VERSION_PATCHLEVEL 8
#define MAX_CLANG_ABI_COMPAT_VERSION 21
#define CLANG_VENDOR "FreeBSD "
diff --git a/lib/clang/include/lld/Common/Version.inc b/lib/clang/include/lld/Common/Version.inc
index 3a33768a4b99..0e69f9627120 100644
--- a/lib/clang/include/lld/Common/Version.inc
+++ b/lib/clang/include/lld/Common/Version.inc
@@ -1,4 +1,4 @@
// Local identifier in __FreeBSD_version style
#define LLD_FREEBSD_VERSION 1500001
-#define LLD_VERSION_STRING "21.1.7 (FreeBSD llvmorg-21.1.7-0-gcd708029e0b2-" __XSTRING(LLD_FREEBSD_VERSION) ")"
+#define LLD_VERSION_STRING "21.1.8 (FreeBSD llvmorg-21.1.8-0-g2078da43e25a-" __XSTRING(LLD_FREEBSD_VERSION) ")"
diff --git a/lib/clang/include/lldb/Version/Version.inc b/lib/clang/include/lldb/Version/Version.inc
index bd72009d6981..8bce799f6ede 100644
--- a/lib/clang/include/lldb/Version/Version.inc
+++ b/lib/clang/include/lldb/Version/Version.inc
@@ -1,6 +1,6 @@
-#define LLDB_VERSION 21.1.7
-#define LLDB_VERSION_STRING "21.1.7"
+#define LLDB_VERSION 21.1.8
+#define LLDB_VERSION_STRING "21.1.8"
#define LLDB_VERSION_MAJOR 21
#define LLDB_VERSION_MINOR 1
-#define LLDB_VERSION_PATCH 7
+#define LLDB_VERSION_PATCH 8
/* #undef LLDB_FULL_VERSION_STRING */
diff --git a/lib/clang/include/llvm/Config/config.h b/lib/clang/include/llvm/Config/config.h
index ec6ec2639eb4..e504ac8f13bb 100644
--- a/lib/clang/include/llvm/Config/config.h
+++ b/lib/clang/include/llvm/Config/config.h
@@ -301,10 +301,10 @@
#define PACKAGE_NAME "LLVM"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "LLVM 21.1.7"
+#define PACKAGE_STRING "LLVM 21.1.8"
/* Define to the version of this package. */
-#define PACKAGE_VERSION "21.1.7"
+#define PACKAGE_VERSION "21.1.8"
/* Define to the vendor of this package. */
/* #undef PACKAGE_VENDOR */
diff --git a/lib/clang/include/llvm/Config/llvm-config.h b/lib/clang/include/llvm/Config/llvm-config.h
index 15814802ceca..da1dd05e926a 100644
--- a/lib/clang/include/llvm/Config/llvm-config.h
+++ b/lib/clang/include/llvm/Config/llvm-config.h
@@ -73,10 +73,10 @@
#define LLVM_VERSION_MINOR 1
/* Patch version of the LLVM API */
-#define LLVM_VERSION_PATCH 7
+#define LLVM_VERSION_PATCH 8
/* LLVM version string */
-#define LLVM_VERSION_STRING "21.1.7"
+#define LLVM_VERSION_STRING "21.1.8"
/* Whether LLVM records statistics for use with GetStatistics(),
* PrintStatistics() or PrintStatisticsJSON()
diff --git a/lib/clang/include/llvm/Support/VCSRevision.h b/lib/clang/include/llvm/Support/VCSRevision.h
index db985a98ee88..691b724a0307 100644
--- a/lib/clang/include/llvm/Support/VCSRevision.h
+++ b/lib/clang/include/llvm/Support/VCSRevision.h
@@ -1,2 +1,2 @@
-#define LLVM_REVISION "llvmorg-21.1.7-0-gcd708029e0b2"
+#define LLVM_REVISION "llvmorg-21.1.8-0-g2078da43e25a"
#define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git"