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
This commit is contained in:
Dimitry Andric
2026-01-10 16:55:44 +01:00
18 changed files with 74 additions and 30 deletions
@@ -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(),
@@ -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.
@@ -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,
@@ -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;
@@ -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
@@ -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.
+1 -1
View File
@@ -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)
@@ -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;
@@ -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;
@@ -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;
@@ -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);
+3 -3
View File
@@ -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"
+3 -3
View File
@@ -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 "
+1 -1
View File
@@ -1,4 +1,4 @@
// Local identifier in __FreeBSD_version style
#define LLD_FREEBSD_VERSION 1600000
#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) ")"
+3 -3
View File
@@ -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 */
+2 -2
View File
@@ -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 */
+2 -2
View File
@@ -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()
+1 -1
View File
@@ -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"