Skip to content

Commit 8c30b9c

Browse files
committed
Merge tag 'llvmorg-21.1.2' into rustc/21.1-2025-08-01
LLVM Release 21.1.2
2 parents 3337936 + b708aea commit 8c30b9c

File tree

68 files changed

+2570
-1176
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+2570
-1176
lines changed

clang/include/clang/Basic/riscv_vector.td

Lines changed: 77 additions & 858 deletions
Large diffs are not rendered by default.

clang/lib/Basic/Targets/X86.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,7 @@ class LLVM_LIBRARY_VISIBILITY CygwinX86_32TargetInfo : public X86_32TargetInfo {
649649
: X86_32TargetInfo(Triple, Opts) {
650650
this->WCharType = TargetInfo::UnsignedShort;
651651
this->WIntType = TargetInfo::UnsignedInt;
652+
this->UseMicrosoftManglingForC = true;
652653
DoubleAlign = LongLongAlign = 64;
653654
resetDataLayout("e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-"
654655
"i128:128-f80:32-n8:16:32-a:0:32-S32",
@@ -986,6 +987,7 @@ class LLVM_LIBRARY_VISIBILITY CygwinX86_64TargetInfo : public X86_64TargetInfo {
986987
: X86_64TargetInfo(Triple, Opts) {
987988
this->WCharType = TargetInfo::UnsignedShort;
988989
this->WIntType = TargetInfo::UnsignedInt;
990+
this->UseMicrosoftManglingForC = true;
989991
}
990992

991993
void getTargetDefines(const LangOptions &Opts,

clang/lib/CodeGen/TargetBuiltins/RISCV.cpp

Lines changed: 945 additions & 4 deletions
Large diffs are not rendered by default.

clang/lib/Format/Format.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4043,6 +4043,7 @@ LangOptions getFormattingLangOpts(const FormatStyle &Style) {
40434043
switch (Style.Language) {
40444044
case FormatStyle::LK_C:
40454045
LangOpts.C11 = 1;
4046+
LangOpts.C23 = 1;
40464047
break;
40474048
case FormatStyle::LK_Cpp:
40484049
case FormatStyle::LK_ObjC:

clang/lib/Sema/SemaExprCXX.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,8 @@ ParsedType Sema::getDestructorName(const IdentifierInfo &II,
347347
CheckTypenameType(ElaboratedTypeKeyword::None, SourceLocation(),
348348
SS.getWithLocInContext(Context), II, NameLoc, &TSI,
349349
/*DeducedTSTContext=*/true);
350+
if (T.isNull())
351+
return ParsedType();
350352
return CreateParsedType(T, TSI);
351353
}
352354

clang/test/CodeGen/mangle-windows.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 | FileCheck %s
2-
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-mingw32 | FileCheck %s
2+
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-mingw32 | FileCheck %s
3+
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-cygwin | FileCheck %s
34
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-windows-msvc-elf | FileCheck %s --check-prefix=ELF32
45
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-pc-win32 | FileCheck %s --check-prefix=X64
5-
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-mingw32 | FileCheck %s --check-prefix=X64
6+
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-mingw32 | FileCheck %s --check-prefix=X64
7+
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-cygwin | FileCheck %s --check-prefix=X64
68
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-pc-windows-msvc-elf | FileCheck %s --check-prefix=ELF64
79

810
// CHECK: target datalayout = "e-m:x-{{.*}}"

clang/test/CodeGenCXX/mangle-windows.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-mingw32 | \
55
// RUN: FileCheck --check-prefix=ITANIUM %s
66

7+
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-cygwin | \
8+
// RUN: FileCheck --check-prefix=ITANIUM %s
9+
710
void __stdcall f1(void) {}
811
// WIN: define dso_local x86_stdcallcc void @"?f1@@YGXXZ"
912
// ITANIUM: define dso_local x86_stdcallcc void @"\01__Z2f1v@0"

clang/test/SemaTemplate/destructor-template.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,18 @@ struct T : S {
104104
~T() = default;
105105
};
106106
} // namespace PR38671
107+
108+
namespace GH159630 {
109+
110+
struct X {
111+
template<typename T>
112+
struct typo { // expected-note {{'typo' declared here}}
113+
~typo();
114+
};
115+
};
116+
117+
template<typename T>
118+
X::typo<T>::typ0::~typ0() {} // expected-error {{no member named 'typ0'}} \
119+
// expected-error {{no type named 'typ0'}}
120+
121+
}

clang/unittests/Format/TokenAnnotatorTest.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4097,6 +4097,13 @@ TEST_F(TokenAnnotatorTest, UTF8StringLiteral) {
40974097
EXPECT_TOKEN(Tokens[1], tok::utf8_string_literal, TT_Unknown);
40984098
}
40994099

4100+
TEST_F(TokenAnnotatorTest, C23DigitSeparator) {
4101+
auto Tokens = annotate("return 1'000;", getLLVMStyle(FormatStyle::LK_C));
4102+
ASSERT_EQ(Tokens.size(), 4u) << Tokens;
4103+
EXPECT_EQ(Tokens[1]->TokenText, "1'000");
4104+
EXPECT_TOKEN(Tokens[2], tok::semi, TT_Unknown);
4105+
}
4106+
41004107
TEST_F(TokenAnnotatorTest, IdentifierPackage) {
41014108
auto Tokens = annotate("auto package;");
41024109
ASSERT_EQ(Tokens.size(), 4u) << Tokens;

cmake/Modules/LLVMVersion.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ if(NOT DEFINED LLVM_VERSION_MINOR)
77
set(LLVM_VERSION_MINOR 1)
88
endif()
99
if(NOT DEFINED LLVM_VERSION_PATCH)
10-
set(LLVM_VERSION_PATCH 1)
10+
set(LLVM_VERSION_PATCH 2)
1111
endif()
1212
if(NOT DEFINED LLVM_VERSION_SUFFIX)
1313
set(LLVM_VERSION_SUFFIX)

0 commit comments

Comments
 (0)