Skip to content

Commit dd14c8b

Browse files
committed
Merge branch 'main' of https://github.com/llvm/llvm-project into feat/28334
2 parents bc2e562 + ab811e7 commit dd14c8b

File tree

513 files changed

+23023
-7482
lines changed

Some content is hidden

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

513 files changed

+23023
-7482
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
fetch-depth: 1
6666
- name: Get subprojects that have doc changes
6767
id: docs-changed-subprojects
68-
uses: tj-actions/changed-files@fea790cb660e33aef4bdf07304e28fedd77dfa13 # v39.2.4
68+
uses: tj-actions/changed-files@dcc7a0cba800f454d79fff4b993e8c3555bcc0a8 # v45.0.7
6969
with:
7070
files_yaml: |
7171
llvm:

.github/workflows/issue-write.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939

4040
- name: 'Comment on PR'
4141
if: steps.download-artifact.outputs.artifact-id != ''
42-
uses: actions/github-script@ffc2c79a5b2490bd33e0a41c1de74b877714d736 # v3.2.0
42+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
4343
with:
4444
github-token: ${{ secrets.GITHUB_TOKEN }}
4545
script: |

bolt/runtime/hugify.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ static bool hasPagecacheTHPSupport() {
8585
KernelVersionTy KernelVersion;
8686

8787
getKernelVersion((uint32_t *)&KernelVersion);
88-
if (KernelVersion.major >= 5 && KernelVersion.minor >= 10)
88+
if (KernelVersion.major >= 6 ||
89+
(KernelVersion.major == 5 && KernelVersion.minor >= 10))
8990
return true;
9091

9192
return false;

bolt/utils/docker/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ RUN mkdir build && \
2323
-DCMAKE_EXE_LINKER_FLAGS="-Wl,--push-state -Wl,-whole-archive -ljemalloc_pic -Wl,--pop-state -lpthread -lstdc++ -lm -ldl" \
2424
-DCMAKE_INSTALL_PREFIX=/home/bolt/install && \
2525
ninja check-bolt && \
26-
ninja install-llvm-bolt install-perf2bolt install-merge-fdata \
27-
install-llvm-boltdiff install-bolt_rt
26+
ninja install-llvm-bolt install-merge-fdata install-bolt_rt
2827

2928
FROM ubuntu:24.04
3029

clang/docs/ReleaseNotes.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ Resolutions to C++ Defect Reports
9696
- Implemented `CWG2918 Consideration of constraints for address of overloaded `
9797
`function <https://cplusplus.github.io/CWG/issues/2918.html>`_
9898

99+
- Bumped the ``__cpp_constexpr`` feature-test macro to ``202002L`` in C++20 mode as indicated in
100+
`P2493R0 <https://wg21.link/P2493R0>`_.
101+
99102
C Language Changes
100103
------------------
101104

@@ -244,6 +247,8 @@ Bug Fixes in This Version
244247
when it can affect template argument deduction (#GH122306).
245248
- Fix crash on code completion of function calls involving partial order of function templates
246249
(#GH125500).
250+
- Fixed clang crash when #embed data does not fit into an array
251+
(#GH128987).
247252

248253
Bug Fixes to Compiler Builtins
249254
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -265,6 +270,8 @@ Bug Fixes to C++ Support
265270
- Clang is now better at keeping track of friend function template instance contexts. (#GH55509)
266271
- Clang now prints the correct instantiation context for diagnostics suppressed
267272
by template argument deduction.
273+
- Clang is now better at instantiating the function definition after its use inside
274+
of a constexpr lambda. (#GH125747)
268275
- The initialization kind of elements of structured bindings
269276
direct-list-initialized from an array is corrected to direct-initialization.
270277
- Clang no longer crashes when a coroutine is declared ``[[noreturn]]``. (#GH127327)

clang/include/clang/AST/Type.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2661,6 +2661,7 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase {
26612661
bool isHLSLSpecificType() const; // Any HLSL specific type
26622662
bool isHLSLBuiltinIntangibleType() const; // Any HLSL builtin intangible type
26632663
bool isHLSLAttributedResourceType() const;
2664+
bool isHLSLResourceRecord() const;
26642665
bool isHLSLIntangibleType()
26652666
const; // Any HLSL intangible type (builtin, array, class)
26662667

clang/include/clang/CIR/MissingFeatures.h

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ struct MissingFeatures {
2727
// Address space related
2828
static bool addressSpace() { return false; }
2929

30-
// This isn't needed until we add support for bools.
31-
static bool convertTypeForMemory() { return false; }
32-
3330
// CIRGenFunction implementation details
3431
static bool cgfSymbolTable() { return false; }
3532

@@ -40,10 +37,14 @@ struct MissingFeatures {
4037
static bool opGlobalAlignment() { return false; }
4138
static bool opGlobalLinkage() { return false; }
4239

43-
// Load attributes
40+
// Load/store attributes
4441
static bool opLoadThreadLocal() { return false; }
4542
static bool opLoadEmitScalarRangeCheck() { return false; }
4643
static bool opLoadBooleanRepresentation() { return false; }
44+
static bool opLoadStoreTbaa() { return false; }
45+
static bool opLoadStoreMemOrder() { return false; }
46+
static bool opLoadStoreVolatile() { return false; }
47+
static bool opLoadStoreAlignment() { return false; }
4748

4849
// AllocaOp handling
4950
static bool opAllocaVarDeclContext() { return false; }
@@ -55,11 +56,23 @@ struct MissingFeatures {
5556
static bool opAllocaOpenMPThreadPrivate() { return false; }
5657
static bool opAllocaEscapeByReference() { return false; }
5758
static bool opAllocaReference() { return false; }
59+
static bool opAllocaAnnotations() { return false; }
60+
static bool opAllocaDynAllocSize() { return false; }
61+
62+
// FuncOp handling
63+
static bool opFuncOpenCLKernelMetadata() { return false; }
64+
static bool opFuncCallingConv() { return false; }
65+
static bool opFuncExtraAttrs() { return false; }
66+
static bool opFuncDsolocal() { return false; }
67+
static bool opFuncLinkage() { return false; }
68+
static bool opFuncVisibility() { return false; }
5869

5970
// Misc
6071
static bool scalarConversionOpts() { return false; }
6172
static bool tryEmitAsConstant() { return false; }
6273
static bool constructABIArgDirectExtend() { return false; }
74+
static bool opGlobalViewAttr() { return false; }
75+
static bool lowerModeOptLevel() { return false; }
6376
};
6477

6578
} // namespace cir

clang/include/clang/Sema/Sema.h

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13657,12 +13657,16 @@ class Sema final : public SemaBase {
1365713657

1365813658
class LocalEagerInstantiationScope {
1365913659
public:
13660-
LocalEagerInstantiationScope(Sema &S) : S(S) {
13660+
LocalEagerInstantiationScope(Sema &S, bool AtEndOfTU)
13661+
: S(S), AtEndOfTU(AtEndOfTU) {
1366113662
SavedPendingLocalImplicitInstantiations.swap(
1366213663
S.PendingLocalImplicitInstantiations);
1366313664
}
1366413665

13665-
void perform() { S.PerformPendingInstantiations(/*LocalOnly=*/true); }
13666+
void perform() {
13667+
S.PerformPendingInstantiations(/*LocalOnly=*/true,
13668+
/*AtEndOfTU=*/AtEndOfTU);
13669+
}
1366613670

1366713671
~LocalEagerInstantiationScope() {
1366813672
assert(S.PendingLocalImplicitInstantiations.empty() &&
@@ -13673,6 +13677,7 @@ class Sema final : public SemaBase {
1367313677

1367413678
private:
1367513679
Sema &S;
13680+
bool AtEndOfTU;
1367613681
std::deque<PendingImplicitInstantiation>
1367713682
SavedPendingLocalImplicitInstantiations;
1367813683
};
@@ -13695,8 +13700,8 @@ class Sema final : public SemaBase {
1369513700

1369613701
class GlobalEagerInstantiationScope {
1369713702
public:
13698-
GlobalEagerInstantiationScope(Sema &S, bool Enabled)
13699-
: S(S), Enabled(Enabled) {
13703+
GlobalEagerInstantiationScope(Sema &S, bool Enabled, bool AtEndOfTU)
13704+
: S(S), Enabled(Enabled), AtEndOfTU(AtEndOfTU) {
1370013705
if (!Enabled)
1370113706
return;
1370213707

@@ -13710,7 +13715,8 @@ class Sema final : public SemaBase {
1371013715
void perform() {
1371113716
if (Enabled) {
1371213717
S.DefineUsedVTables();
13713-
S.PerformPendingInstantiations();
13718+
S.PerformPendingInstantiations(/*LocalOnly=*/false,
13719+
/*AtEndOfTU=*/AtEndOfTU);
1371413720
}
1371513721
}
1371613722

@@ -13725,7 +13731,8 @@ class Sema final : public SemaBase {
1372513731
S.SavedVTableUses.pop_back();
1372613732

1372713733
// Restore the set of pending implicit instantiations.
13728-
if (S.TUKind != TU_Prefix || !S.LangOpts.PCHInstantiateTemplates) {
13734+
if ((S.TUKind != TU_Prefix || !S.LangOpts.PCHInstantiateTemplates) &&
13735+
AtEndOfTU) {
1372913736
assert(S.PendingInstantiations.empty() &&
1373013737
"PendingInstantiations should be empty before it is discarded.");
1373113738
S.PendingInstantiations.swap(S.SavedPendingInstantiations.back());
@@ -13744,6 +13751,7 @@ class Sema final : public SemaBase {
1374413751
private:
1374513752
Sema &S;
1374613753
bool Enabled;
13754+
bool AtEndOfTU;
1374713755
};
1374813756

1374913757
ExplicitSpecifier instantiateExplicitSpecifier(
@@ -13929,7 +13937,8 @@ class Sema final : public SemaBase {
1392913937

1393013938
/// Performs template instantiation for all implicit template
1393113939
/// instantiations we have seen until this point.
13932-
void PerformPendingInstantiations(bool LocalOnly = false);
13940+
void PerformPendingInstantiations(bool LocalOnly = false,
13941+
bool AtEndOfTU = true);
1393313942

1393413943
TemplateParameterList *
1393513944
SubstTemplateParams(TemplateParameterList *Params, DeclContext *Owner,

clang/include/clang/Tooling/DependencyScanning/DependencyScanningService.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,11 @@ enum class ScanningOptimizations {
6767
IgnoreCWD = (1 << 4),
6868

6969
DSS_LAST_BITMASK_ENUM(IgnoreCWD),
70-
Default = All
70+
71+
// The build system needs to be aware that the current working
72+
// directory is ignored. Without a good way of notifying the build
73+
// system, it is less risky to default to off.
74+
Default = All & (~IgnoreCWD)
7175
};
7276

7377
#undef DSS_LAST_BITMASK_ENUM

clang/lib/AST/ByteCode/Compiler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6325,7 +6325,7 @@ bool Compiler<Emitter>::visitDeclRef(const ValueDecl *D, const Expr *E) {
63256325
if (auto It = Locals.find(D); It != Locals.end()) {
63266326
const unsigned Offset = It->second.Offset;
63276327
if (IsReference)
6328-
return this->emitGetLocal(PT_Ptr, Offset, E);
6328+
return this->emitGetLocal(classifyPrim(E), Offset, E);
63296329
return this->emitGetPtrLocal(Offset, E);
63306330
} else if (auto GlobalIndex = P.getGlobal(D)) {
63316331
if (IsReference) {

0 commit comments

Comments
 (0)