Skip to content

Commit c658a89

Browse files
committed
Merge branch 'main' of https://github.com/llvm/llvm-project into gfx1x_fwd_progress
2 parents de355d5 + 5c055cc commit c658a89

File tree

258 files changed

+5844
-4505
lines changed

Some content is hidden

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

258 files changed

+5844
-4505
lines changed

.github/workflows/libcxx-build-and-test.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
cc: 'gcc-14'
5656
cxx: 'g++-14'
5757
steps:
58-
- uses: actions/checkout@v4
58+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
5959
- name: ${{ matrix.config }}.${{ matrix.cxx }}
6060
run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
6161
env:
@@ -105,7 +105,7 @@ jobs:
105105
cc: 'clang-18'
106106
cxx: 'clang++-18'
107107
steps:
108-
- uses: actions/checkout@v4
108+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
109109
- name: ${{ matrix.config }}
110110
run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
111111
env:
@@ -169,7 +169,7 @@ jobs:
169169
runs-on: ${{ matrix.machine }}
170170
container: ghcr.io/llvm/libcxx-linux-builder:b319dfef21f6c7b0bc6a356d6b9f41a3b3b98ae9
171171
steps:
172-
- uses: actions/checkout@v4
172+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
173173
- name: ${{ matrix.config }}
174174
run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
175175
env:
@@ -207,11 +207,11 @@ jobs:
207207
os: macos-13
208208
runs-on: ${{ matrix.os }}
209209
steps:
210-
- uses: actions/checkout@v4
211-
- uses: maxim-lobanov/setup-xcode@v1
210+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
211+
- uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0
212212
with:
213213
xcode-version: 'latest'
214-
- uses: seanmiddleditch/gha-setup-ninja@master
214+
- uses: seanmiddleditch/gha-setup-ninja@3b1f8f94a2f8254bd26914c4ab9474d4f0015f67 # v6
215215
- name: Build and test
216216
run: |
217217
python3 -m venv .venv
@@ -247,7 +247,7 @@ jobs:
247247
- { config: mingw-dll-i686, mingw: true }
248248
- { config: mingw-incomplete-sysroot, mingw: true }
249249
steps:
250-
- uses: actions/checkout@v4
250+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
251251
- name: Install dependencies
252252
run: |
253253
choco install -y ninja
@@ -275,7 +275,7 @@ jobs:
275275
echo "c:\Program Files\Git\usr\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
276276
- name: Set up the MSVC dev environment
277277
if: ${{ matrix.mingw != true }}
278-
uses: ilammy/msvc-dev-cmd@v1
278+
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
279279
- name: Build and test
280280
run: |
281281
bash libcxx/utils/ci/run-buildbot ${{ matrix.config }}

.github/workflows/libcxx-build-containers.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
packages: write
3333

3434
steps:
35-
- uses: actions/checkout@v4
35+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3636

3737
- name: Build the Linux builder image
3838
working-directory: libcxx/utils/ci
@@ -47,7 +47,7 @@ jobs:
4747
# TAG: ${{ github.sha }}
4848

4949
- name: Log in to GitHub Container Registry
50-
uses: docker/login-action@v3
50+
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
5151
with:
5252
registry: ghcr.io
5353
username: ${{ github.actor }}

.github/workflows/libcxx-check-generated-files.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
runs-on: ubuntu-24.04
1313
steps:
1414
- name: Fetch LLVM sources
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1616

1717
- name: Install dependencies
18-
uses: aminya/setup-cpp@v1
18+
uses: aminya/setup-cpp@17c11551771948abc5752bbf3183482567c7caf0 # v1.1.1
1919
with:
2020
clangformat: 17.0.1
2121
ninja: true

.github/workflows/release-asset-audit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def _get_uploaders(release_version):
2424
return set(
2525
[
2626
"DimitryAndric",
27-
"stefanp-ibm",
27+
"stefanp-synopsys",
2828
"lei137",
2929
"omjavaid",
3030
"nicolerabjohn",

clang/docs/ReleaseNotes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,8 @@ Bug Fixes to C++ Support
295295
direct-list-initialized from an array is corrected to direct-initialization.
296296
- Clang no longer crashes when a coroutine is declared ``[[noreturn]]``. (#GH127327)
297297
- Clang now uses the parameter location for abbreviated function templates in ``extern "C"``. (#GH46386)
298+
- Clang will emit an error instead of crash when use co_await or co_yield in
299+
C++26 braced-init-list template parameter initialization. (#GH78426)
298300
- Fixes matching of nested template template parameters. (#GH130362)
299301
- Correctly diagnoses template template paramters which have a pack parameter
300302
not in the last position.

clang/include/clang/AST/Mangle.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ class MangleContext {
140140
virtual void mangleCXXRTTIName(QualType T, raw_ostream &,
141141
bool NormalizeIntegers = false) = 0;
142142
virtual void mangleStringLiteral(const StringLiteral *SL, raw_ostream &) = 0;
143-
virtual void mangleMSGuidDecl(const MSGuidDecl *GD, raw_ostream &);
143+
virtual void mangleMSGuidDecl(const MSGuidDecl *GD, raw_ostream &) const;
144144

145145
void mangleGlobalBlock(const BlockDecl *BD, const NamedDecl *ID,
146146
raw_ostream &Out);
@@ -153,9 +153,9 @@ class MangleContext {
153153

154154
void mangleObjCMethodName(const ObjCMethodDecl *MD, raw_ostream &OS,
155155
bool includePrefixByte = true,
156-
bool includeCategoryNamespace = true);
156+
bool includeCategoryNamespace = true) const;
157157
void mangleObjCMethodNameAsSourceName(const ObjCMethodDecl *MD,
158-
raw_ostream &);
158+
raw_ostream &) const;
159159

160160
virtual void mangleStaticGuardVariable(const VarDecl *D, raw_ostream &) = 0;
161161

clang/include/clang/Basic/Attr.td

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4717,21 +4717,21 @@ def HLSLNumThreads: InheritableAttr {
47174717
}
47184718

47194719
def HLSLSV_GroupThreadID: HLSLAnnotationAttr {
4720-
let Spellings = [HLSLAnnotation<"SV_GroupThreadID">];
4720+
let Spellings = [HLSLAnnotation<"sv_groupthreadid">];
47214721
let Subjects = SubjectList<[ParmVar, Field]>;
47224722
let LangOpts = [HLSL];
47234723
let Documentation = [HLSLSV_GroupThreadIDDocs];
47244724
}
47254725

47264726
def HLSLSV_GroupID: HLSLAnnotationAttr {
4727-
let Spellings = [HLSLAnnotation<"SV_GroupID">];
4727+
let Spellings = [HLSLAnnotation<"sv_groupid">];
47284728
let Subjects = SubjectList<[ParmVar, Field]>;
47294729
let LangOpts = [HLSL];
47304730
let Documentation = [HLSLSV_GroupIDDocs];
47314731
}
47324732

47334733
def HLSLSV_GroupIndex: HLSLAnnotationAttr {
4734-
let Spellings = [HLSLAnnotation<"SV_GroupIndex">];
4734+
let Spellings = [HLSLAnnotation<"sv_groupindex">];
47354735
let Subjects = SubjectList<[ParmVar, GlobalVar]>;
47364736
let LangOpts = [HLSL];
47374737
let Documentation = [HLSLSV_GroupIndexDocs];
@@ -4783,7 +4783,7 @@ def HLSLPackOffset: HLSLAnnotationAttr {
47834783
}
47844784

47854785
def HLSLSV_DispatchThreadID: HLSLAnnotationAttr {
4786-
let Spellings = [HLSLAnnotation<"SV_DispatchThreadID">];
4786+
let Spellings = [HLSLAnnotation<"sv_dispatchthreadid">];
47874787
let Subjects = SubjectList<[ParmVar, Field]>;
47884788
let LangOpts = [HLSL];
47894789
let Documentation = [HLSLSV_DispatchThreadIDDocs];

clang/lib/AST/Mangle.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,8 @@ void MangleContext::mangleName(GlobalDecl GD, raw_ostream &Out) {
240240
Out << ((DefaultPtrWidth / 8) * ArgWords);
241241
}
242242

243-
void MangleContext::mangleMSGuidDecl(const MSGuidDecl *GD, raw_ostream &Out) {
243+
void MangleContext::mangleMSGuidDecl(const MSGuidDecl *GD,
244+
raw_ostream &Out) const {
244245
// For now, follow the MSVC naming convention for GUID objects on all
245246
// targets.
246247
MSGuidDecl::Parts P = GD->getParts();
@@ -327,7 +328,7 @@ void MangleContext::mangleBlock(const DeclContext *DC, const BlockDecl *BD,
327328
void MangleContext::mangleObjCMethodName(const ObjCMethodDecl *MD,
328329
raw_ostream &OS,
329330
bool includePrefixByte,
330-
bool includeCategoryNamespace) {
331+
bool includeCategoryNamespace) const {
331332
if (getASTContext().getLangOpts().ObjCRuntime.isGNUFamily()) {
332333
// This is the mangling we've always used on the GNU runtimes, but it
333334
// has obvious collisions in the face of underscores within class
@@ -382,7 +383,7 @@ void MangleContext::mangleObjCMethodName(const ObjCMethodDecl *MD,
382383
}
383384

384385
void MangleContext::mangleObjCMethodNameAsSourceName(const ObjCMethodDecl *MD,
385-
raw_ostream &Out) {
386+
raw_ostream &Out) const {
386387
SmallString<64> Name;
387388
llvm::raw_svector_ostream OS(Name);
388389

clang/lib/Basic/Attributes.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,17 @@ static SmallString<64> normalizeName(const IdentifierInfo *Name,
143143
StringRef ScopeName = normalizeAttrScopeName(Scope, SyntaxUsed);
144144
StringRef AttrName = normalizeAttrName(Name, ScopeName, SyntaxUsed);
145145

146+
std::string StrAttrName = AttrName.str();
147+
if (SyntaxUsed == AttributeCommonInfo::AS_HLSLAnnotation)
148+
StrAttrName = AttrName.lower();
149+
146150
SmallString<64> FullName = ScopeName;
147151
if (!ScopeName.empty()) {
148152
assert(SyntaxUsed == AttributeCommonInfo::AS_CXX11 ||
149153
SyntaxUsed == AttributeCommonInfo::AS_C23);
150154
FullName += "::";
151155
}
152-
FullName += AttrName;
156+
FullName += StrAttrName;
153157

154158
return FullName;
155159
}

clang/lib/CIR/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
include_directories(${LLVM_MAIN_SRC_DIR}/../mlir/include)
22
include_directories(${CMAKE_BINARY_DIR}/tools/mlir/include)
33

4+
# GCC, unlike clang, issues a warning when one virtual function is overridden
5+
# in a derived class but one or more other virtual functions with the same
6+
# name and different signature from a base class are not overridden. This
7+
# leads to many warnings in the MLIR and ClangIR code when using the
8+
# OpenConversionPattern<>::matchAndRewrite() function in the ordinary way.
9+
# The "hiding" behavior is what we want, so we're just disabling the warning
10+
# here.
11+
if (LLVM_COMPILER_IS_GCC_COMPATIBLE AND (NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang"))
12+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-overloaded-virtual")
13+
endif()
14+
415
add_subdirectory(Dialect)
516
add_subdirectory(CodeGen)
617
add_subdirectory(FrontendAction)

0 commit comments

Comments
 (0)