Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.

Commit 9f89bd0

Browse files
SC llvm teamSC llvm team
authored andcommitted
Merged main:bcc1e584483c into amd-gfx:9b4dd1cdfe84
Local branch amd-gfx 9b4dd1c Merge main into amd-gfx Remote branch main bcc1e58 [ELF] Allow --symbol-ordering-file and call graph profile to be used together
2 parents 9b4dd1c + bcc1e58 commit 9f89bd0

File tree

289 files changed

+14796
-6882
lines changed

Some content is hidden

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

289 files changed

+14796
-6882
lines changed

.github/workflows/build-ci-container.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,9 @@ jobs:
5959

6060
- name: Test Container
6161
run: |
62-
for image in ${{ steps.vars.outputs.container-name-tag }} ${{ steps.vars.outputs.container-name }}; do
63-
podman run --rm -it $image /usr/bin/bash -x -c 'cd $HOME && printf '\''#include <iostream>\nint main(int argc, char **argv) { std::cout << "Hello\\n"; }'\'' | clang++ -x c++ - && ./a.out | grep Hello'
62+
for image in ${{ steps.vars.outputs.container-name-tag }}; do
63+
# Use --pull=never to ensure we are testing the just built image.
64+
podman run --pull=never --rm -it $image /usr/bin/bash -x -c 'cd $HOME && printf '\''#include <iostream>\nint main(int argc, char **argv) { std::cout << "Hello\\n"; }'\'' | clang++ -x c++ - && ./a.out | grep Hello'
6465
done
6566
6667
push-ci-container:

.github/workflows/new-issues.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
steps:
1616
- uses: llvm/actions/issue-labeler@main
1717
with:
18-
repo-token: ${{ secrets.GITHUB_TOKEN }}
18+
repo-token: ${{ secrets.ISSUE_SUBSCRIBER_TOKEN }}
1919
configuration-path: .github/new-issues-labeler.yml
2020
include-title: 1
2121
include-body: 0

.github/workflows/release-binaries.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ jobs:
8383
USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }}
8484
shell: bash
8585
run: |
86-
./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --user ${{ github.actor }} --user-token "$USER_TOKEN" check-permissions
86+
./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --user "$GITHUB_ACTOR" --user-token "$USER_TOKEN" check-permissions
8787
8888
- name: Collect Variables
8989
id: vars
@@ -102,8 +102,8 @@ jobs:
102102
release_version="$trimmed"
103103
ref="llvmorg-$release_version"
104104
else
105-
release_version="${{ (github.event_name == 'pull_request' && format('PR{0}', github.event.pull_request.number)) || 'CI'}}-${{ github.sha }}"
106-
ref=${{ github.sha }}
105+
release_version="${{ (github.event_name == 'pull_request' && format('PR{0}', github.event.pull_request.number)) || 'CI'}}-$GITHUB_SHA"
106+
ref="$GITHUB_SHA"
107107
fi
108108
if [ -n "${{ inputs.upload }}" ]; then
109109
upload="${{ inputs.upload }}"
@@ -114,20 +114,20 @@ jobs:
114114
echo "ref=$ref" >> $GITHUB_OUTPUT
115115
echo "upload=$upload" >> $GITHUB_OUTPUT
116116
117-
release_binary_basename="LLVM-$release_version-${{ runner.os }}-${{ runner.arch }}"
117+
release_binary_basename="LLVM-$release_version-$RUNNER_OS-$RUNNER_ARCH"
118118
echo "release-binary-basename=$release_binary_basename" >> $GITHUB_OUTPUT
119119
echo "release-binary-filename=$release_binary_basename.tar.xz" >> $GITHUB_OUTPUT
120120
121121
# Detect necessary CMake flags
122-
target="${{ runner.os }}-${{ runner.arch }}"
122+
target="$RUNNER_OS-$RUNNER_ARCH"
123123
echo "enable-pgo=false" >> $GITHUB_OUTPUT
124124
target_cmake_flags="-DLLVM_RELEASE_ENABLE_PGO=OFF"
125125
# The macOS builds try to cross compile some libraries so we need to
126126
# add extra CMake args to disable them.
127127
# See https://github.com/llvm/llvm-project/issues/99767
128-
if [ "${{ runner.os }}" = "macOS" ]; then
128+
if [ "$RUNNER_OS" = "macOS" ]; then
129129
target_cmake_flags="$target_cmake_flags -DBOOTSTRAP_COMPILER_RT_ENABLE_IOS=OFF"
130-
if [ "${{ runner.arch }}" = "ARM64" ]; then
130+
if [ "$RUNNER_ARCH" = "ARM64" ]; then
131131
arches=arm64
132132
else
133133
arches=x86_64
@@ -137,7 +137,7 @@ jobs:
137137
138138
build_flang="true"
139139
140-
if [ "${{ runner.os }}" = "Windows" ]; then
140+
if [ "$RUNNER_OS" = "Windows" ]; then
141141
# The build times out on Windows, so we need to disable LTO.
142142
target_cmake_flags="$target_cmake_flags -DLLVM_RELEASE_ENABLE_LTO=OFF"
143143
fi

clang/docs/ClangFormatStyleOptions.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4661,12 +4661,13 @@ the configuration (without a prefix: ``Auto``).
46614661
.. _KeepEmptyLinesAtEOF:
46624662

46634663
**KeepEmptyLinesAtEOF** (``Boolean``) :versionbadge:`clang-format 17` :ref:`<KeepEmptyLinesAtEOF>`
4664-
This option is deprecated. See ``AtEndOfFile`` of ``KeepEmptyLines``.
4664+
This option is **deprecated**. See ``AtEndOfFile`` of ``KeepEmptyLines``.
46654665

46664666
.. _KeepEmptyLinesAtTheStartOfBlocks:
46674667

46684668
**KeepEmptyLinesAtTheStartOfBlocks** (``Boolean``) :versionbadge:`clang-format 3.7` :ref:`<KeepEmptyLinesAtTheStartOfBlocks>`
4669-
This option is deprecated. See ``AtStartOfBlock`` of ``KeepEmptyLines``.
4669+
This option is **deprecated**. See ``AtStartOfBlock`` of
4670+
``KeepEmptyLines``.
46704671

46714672
.. _KeepFormFeed:
46724673

@@ -6730,8 +6731,8 @@ the configuration (without a prefix: ``Auto``).
67306731
.. _TemplateNames:
67316732

67326733
**TemplateNames** (``List of Strings``) :versionbadge:`clang-format 20` :ref:`<TemplateNames>`
6733-
A vector of non-keyword identifiers that should be interpreted as
6734-
template names.
6734+
A vector of non-keyword identifiers that should be interpreted as template
6735+
names.
67356736

67366737
A ``<`` after a template name is annotated as a template opener instead of
67376738
a binary operator.

clang/docs/LibASTMatchersReference.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2546,6 +2546,17 @@ <h2 id="decl-matchers">Node Matchers</h2>
25462546
};
25472547
</pre></td></tr>
25482548

2549+
<tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1Type.html">Type</a>&gt;</td><td class="name" onclick="toggle('dependentTemplateSpecializationType0')"><a name="dependentTemplateSpecializationType0Anchor">dependentTemplateSpecializationType</a></td><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1DependentTemplateSpecializationType.html">DependentTemplateSpecializationType</a>&gt;...</td></tr>
2550+
<tr><td colspan="4" class="doc" id="dependentTemplateSpecializationType0"><pre>Matches a dependent template specialization type.
2551+
2552+
Example matches A<T>::template B<T>
2553+
2554+
template<typename T> struct A;
2555+
template<typename T> struct declToImport {
2556+
typename A<T>::template B<T> a;
2557+
};
2558+
</pre></td></tr>
2559+
25492560
<tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1Type.html">Type</a>&gt;</td><td class="name" onclick="toggle('deducedTemplateSpecializationType0')"><a name="deducedTemplateSpecializationType0Anchor">deducedTemplateSpecializationType</a></td><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1DeducedTemplateSpecializationType.html">DeducedTemplateSpecializationType</a>&gt;...</td></tr>
25502561
<tr><td colspan="4" class="doc" id="deducedTemplateSpecializationType0"><pre>Matches C++17 deduced template specialization types, e.g. deduced class
25512562
template types.

clang/docs/ReleaseNotes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,6 +1114,8 @@ AST Matchers
11141114

11151115
- Add ``dependentNameType`` matcher to match a dependent name type.
11161116

1117+
- Add ``dependentTemplateSpecializationType`` matcher to match a dependent template specialization type.
1118+
11171119
clang-format
11181120
------------
11191121

clang/include/clang/ASTMatchers/ASTMatchers.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7721,6 +7721,18 @@ AST_MATCHER_P(DecayedType, hasDecayedType, internal::Matcher<QualType>,
77217721
/// \endcode
77227722
extern const AstTypeMatcher<DependentNameType> dependentNameType;
77237723

7724+
/// Matches a dependent template specialization type
7725+
///
7726+
/// Example matches A<T>::template B<T>
7727+
/// \code
7728+
/// template<typename T> struct A;
7729+
/// template<typename T> struct declToImport {
7730+
/// typename A<T>::template B<T> a;
7731+
/// };
7732+
/// \endcode
7733+
extern const AstTypeMatcher<DependentTemplateSpecializationType>
7734+
dependentTemplateSpecializationType;
7735+
77247736
/// Matches declarations whose declaration context, interpreted as a
77257737
/// Decl, matches \c InnerMatcher.
77267738
///

clang/include/clang/Basic/Builtins.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ class Context {
102102
/// e.g. "__builtin_abs".
103103
llvm::StringRef getName(unsigned ID) const { return getRecord(ID).Name; }
104104

105+
/// Return a quoted name for the specified builtin for use in diagnostics.
106+
std::string getQuotedName(unsigned ID) const;
107+
105108
/// Get the type descriptor string for the specified builtin.
106109
const char *getTypeString(unsigned ID) const { return getRecord(ID).Type; }
107110

clang/include/clang/Basic/BuiltinsBase.td

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,15 @@ class Builtin {
8888
// On some platforms, some functions are actually macros. In that case we need
8989
// to #undef them.
9090
bit RequiresUndef = 0;
91+
// Enables builtins to generate `long long` outside of OpenCL and `long` inside.
92+
bit EnableOpenCLLong = 0;
9193
}
9294

9395
class CustomEntry {
9496
string Entry;
9597
}
9698

9799
class AtomicBuiltin : Builtin;
98-
class TargetBuiltin : Builtin {
99-
string Features = "";
100-
}
101100

102101
class LibBuiltin<string header, string languages = "ALL_LANGUAGES"> : Builtin {
103102
string Header = header;
@@ -122,6 +121,14 @@ class OCL_DSELangBuiltin : LangBuiltin<"OCL_DSE">;
122121
class OCL_GASLangBuiltin : LangBuiltin<"OCL_GAS">;
123122
class OCLLangBuiltin : LangBuiltin<"ALL_OCL_LANGUAGES">;
124123

124+
class TargetBuiltin : Builtin {
125+
string Features = "";
126+
}
127+
class TargetLibBuiltin : TargetBuiltin {
128+
string Header;
129+
string Languages = "ALL_LANGUAGES";
130+
}
131+
125132
class Template<list<string> substitutions,
126133
list<string> affixes,
127134
bit as_prefix = 0> {

0 commit comments

Comments
 (0)