Skip to content

Commit d22a3bd

Browse files
authored
Merge branch 'main' into sdkrelative
2 parents a007833 + 5db0f83 commit d22a3bd

File tree

195 files changed

+3677
-1102
lines changed

Some content is hidden

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

195 files changed

+3677
-1102
lines changed

.github/CODEOWNERS

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
/docs/Windows* @compnerd
5656

5757
# include
58-
/include/swift-c/DependencyScan/ @artemcm
58+
/include/swift-c/DependencyScan/ @artemcm @cachemeifyoucan
5959
/include/swift/*Demangl*/ @rjmccall
6060
/include/swift/AST/ @hborla @slavapestov @xedin
6161
/include/swift/AST/*Availability* @tshortli
@@ -71,7 +71,7 @@
7171
/include/swift/Basic/ @DougGregor
7272
/include/swift/Basic/Features.def @DougGregor @hborla
7373
/include/swift/ClangImporter @zoecarver @hyp @egorzhdan @beccadax @ian-twilightcoder @Xazax-hun
74-
/include/swift/DependencyScan @artemcm
74+
/include/swift/DependencyScan @artemcm @cachemeifyoucan
7575
/include/swift/Driver*/ @artemcm
7676
/include/swift/Frontend*/ @artemcm @tshortli
7777
/include/swift/IDE/ @ahoppen @bnbarham @hamishknight @rintaro
@@ -118,7 +118,7 @@
118118
/lib/Basic/Windows @compnerd
119119
/lib/ClangImporter @zoecarver @hyp @egorzhdan @beccadax @ian-twilightcoder @Xazax-hun
120120
/lib/ClangImporter/DWARFImporter* @adrian-prantl
121-
/lib/DependencyScan @artemcm
121+
/lib/DependencyScan @artemcm @cachemeifyoucan
122122
/lib/Driver*/ @artemcm
123123
/lib/DriverTool/autolink_extract_main.cpp @MaxDesiatov @etcwilde
124124
/lib/DriverTool/sil* @jckarter
@@ -247,7 +247,7 @@
247247
/unittests/*Demangl*/ @rjmccall
248248
/unittests/AST/ @hborla @slavapestov @xedin
249249
/unittests/AST/*Evaluator* @CodaFi @slavapestov
250-
/unittests/DependencyScan/ @artemcm
250+
/unittests/DependencyScan/ @artemcm @cachemeifyoucan
251251
/unittests/FrontendTool/ @artemcm @tshortli
252252
/unittests/Parse/ @ahoppen @bnbarham @CodaFi @DougGregor @hamishknight @rintaro
253253
/unittests/Reflection/ @slavapestov

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ docs/_build
5252

5353
# SwiftPM
5454
.build
55+
.index-build
5556
.swiftpm
5657

5758
#==============================================================================#

Runtimes/Core/core/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,6 @@ target_compile_options(swiftCore PRIVATE
284284
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature FreestandingMacros>"
285285
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature BitwiseCopyable>"
286286
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature Extern>"
287-
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature DebugDescriptionMacro>"
288287
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xfrontend -group-info-path -Xfrontend ${CMAKE_CURRENT_SOURCE_DIR}/GroupInfo.json>"
289288
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xfrontend -enable-experimental-concise-pound-file>"
290289
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xfrontend -disable-autolinking-runtime-compatibility-concurrency>"

cmake/caches/Windows-aarch64.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ set(LLVM_TARGETS_TO_BUILD AArch64 ARM WebAssembly X86 CACHE STRING "")
5050
set(LLVM_BUILD_LLVM_DYLIB NO CACHE BOOL "")
5151
set(LLVM_BUILD_LLVM_C_DYLIB NO CACHE BOOL "")
5252
set(LLVM_ENABLE_LIBEDIT NO CACHE BOOL "")
53-
set(LLVM_ENABLE_LIBXML2 NO CACHE BOOL "")
53+
set(LLVM_ENABLE_LIBXML2 YES CACHE BOOL "")
5454
set(LLVM_ENABLE_OCAMLDOC NO CACHE BOOL "")
5555
set(LLVM_ENABLE_TERMINFO NO CACHE BOOL "")
5656
set(LLVM_ENABLE_Z3_SOLVER NO CACHE BOOL "")
@@ -62,12 +62,14 @@ set(LLVM_INCLUDE_GO_TESTS NO CACHE BOOL "")
6262
set(LLVM_TOOL_GOLD_BUILD NO CACHE BOOL "")
6363
set(LLVM_TOOL_LLVM_SHLIB_BUILD NO CACHE BOOL "")
6464

65+
set(CLANG_ENABLE_LIBXML2 NO CACHE BOOL "")
66+
6567
# Avoid swig dependency for lldb
6668
set(LLDB_ALLOW_STATIC_BINDINGS YES CACHE BOOL "")
6769
set(LLDB_USE_STATIC_BINDINGS YES CACHE BOOL "")
6870
set(LLDB_ENABLE_PYTHON YES CACHE BOOL "")
6971
set(LLDB_EMBED_PYTHON_HOME NO CACHE BOOL "")
70-
set(LLDB_ENABLE_LIBXML2 NO CACHE BOOL "")
72+
set(LLDB_ENABLE_LIBXML2 YES CACHE BOOL "")
7173

7274
# This requires perl which may not be available on Windows
7375
set(SWIFT_INCLUDE_DOCS NO CACHE BOOL "")

cmake/caches/Windows-x86_64.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ set(LLVM_TARGETS_TO_BUILD AArch64 ARM WebAssembly X86 CACHE STRING "")
9090
set(LLVM_BUILD_LLVM_DYLIB NO CACHE BOOL "")
9191
set(LLVM_BUILD_LLVM_C_DYLIB NO CACHE BOOL "")
9292
set(LLVM_ENABLE_LIBEDIT NO CACHE BOOL "")
93-
set(LLVM_ENABLE_LIBXML2 NO CACHE BOOL "")
93+
set(LLVM_ENABLE_LIBXML2 YES CACHE BOOL "")
9494
set(LLVM_ENABLE_OCAMLDOC NO CACHE BOOL "")
9595
set(LLVM_ENABLE_TERMINFO NO CACHE BOOL "")
9696
set(LLVM_ENABLE_Z3_SOLVER NO CACHE BOOL "")
@@ -102,12 +102,14 @@ set(LLVM_INCLUDE_GO_TESTS NO CACHE BOOL "")
102102
set(LLVM_TOOL_GOLD_BUILD NO CACHE BOOL "")
103103
set(LLVM_TOOL_LLVM_SHLIB_BUILD NO CACHE BOOL "")
104104

105+
set(CLANG_ENABLE_LIBXML2 NO CACHE BOOL "")
106+
105107
# Avoid swig dependency for lldb
106108
set(LLDB_ALLOW_STATIC_BINDINGS YES CACHE BOOL "")
107109
set(LLDB_USE_STATIC_BINDINGS YES CACHE BOOL "")
108110
set(LLDB_ENABLE_PYTHON YES CACHE BOOL "")
109111
set(LLDB_EMBED_PYTHON_HOME NO CACHE BOOL "")
110-
set(LLDB_ENABLE_LIBXML2 NO CACHE BOOL "")
112+
set(LLDB_ENABLE_LIBXML2 YES CACHE BOOL "")
111113

112114
# This requires perl which may not be available on Windows
113115
set(SWIFT_INCLUDE_DOCS NO CACHE BOOL "")

cmake/modules/DarwinSDKs.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set(SUPPORTED_IOS_SIMULATOR_ARCHS "x86_64;arm64")
33
set(SUPPORTED_TVOS_ARCHS "arm64")
44
set(SUPPORTED_TVOS_SIMULATOR_ARCHS "x86_64;arm64")
55
set(SUPPORTED_WATCHOS_ARCHS "armv7k;arm64_32")
6-
set(SUPPORTED_WATCHOS_SIMULATOR_ARCHS "x86_64;arm64")
6+
set(SUPPORTED_WATCHOS_SIMULATOR_ARCHS "i386;x86_64;arm64")
77
set(SUPPORTED_OSX_ARCHS "x86_64;arm64")
88
set(SUPPORTED_XROS_ARCHS "arm64;arm64e")
99
set(SUPPORTED_XROS_SIMULATOR_ARCHS "arm64")

cmake/modules/SwiftConfigureSDK.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ function(remove_sdk_unsupported_archs name os sdk_path deployment_version archit
9191
# 32-bit watchOS is not listed explicitly in SDK settings.
9292
message(STATUS "Assuming ${name} SDK at ${sdk_path} supports architecture ${arch}")
9393
list(APPEND architectures ${arch})
94+
elseif(arch STREQUAL "i386" AND os STREQUAL "watchsimulator")
95+
# 32-bit watchOS simulator is not listed explicitly in SDK settings.
96+
message(STATUS "Assuming ${name} SDK at ${sdk_path} supports architecture ${arch}")
97+
list(APPEND architectures ${arch})
9498
else()
9599
message(STATUS "${name} SDK at ${sdk_path} does not support architecture ${arch}")
96100
endif()

docs/Testing.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -298,14 +298,6 @@ code for the target that is not the build machine:
298298

299299
Add ``REQUIRES: executable_test`` to the test.
300300

301-
* ``%target-run-simple-swift``: build a one-file Swift program and run it on
302-
the target machine.
303-
304-
Use this substitution for executable tests that don't require special
305-
compiler arguments.
306-
307-
Add ``REQUIRES: executable_test`` to the test.
308-
309301
* ``%target-run-stdlib-swift``: like ``%target-run-simple-swift`` with
310302
``-parse-stdlib -Xfrontend -disable-access-control``.
311303

include/swift/AST/ASTMangler.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ enum class DestructorKind {
4545
/// The mangler for AST declarations.
4646
class ASTMangler : public Mangler {
4747
protected:
48-
#if 0 // STAGING
4948
const ASTContext &Context;
50-
#endif
5149
ModuleDecl *Mod = nullptr;
5250

5351
/// Optimize out protocol names if a type only conforms to one protocol.
@@ -189,19 +187,6 @@ class ASTMangler : public Mangler {
189187
HasSymbolQuery,
190188
};
191189

192-
// STAGING: legacy constructor for LLDB
193-
/// lldb overrides the defaulted argument to 'true'.
194-
ASTMangler(bool DWARFMangling = false) {
195-
if (DWARFMangling) {
196-
DWARFMangling = true;
197-
RespectOriginallyDefinedIn = false;
198-
}
199-
}
200-
201-
/// lldb overrides the defaulted argument to 'true'.
202-
ASTMangler(const ASTContext &Ctx, bool DWARFMangling = false) : ASTMangler(DWARFMangling) {}
203-
204-
#if 0
205190
/// lldb overrides the defaulted argument to 'true'.
206191
ASTMangler(const ASTContext &Ctx, bool DWARFMangling = false) : Context(Ctx) {
207192
if (DWARFMangling) {
@@ -214,7 +199,6 @@ class ASTMangler : public Mangler {
214199
}
215200

216201
const ASTContext &getASTContext() { return Context; }
217-
#endif
218202

219203
void addTypeSubstitution(Type type, GenericSignature sig) {
220204
type = dropProtocolsFromAssociatedTypes(type, sig);

include/swift/AST/Attr.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,13 +508,17 @@ class DeclAttribute : public AttributeBase {
508508

509509
/// Create a copy of this attribute.
510510
DeclAttribute *clone(ASTContext &ctx) const;
511+
512+
/// Determine whether we can clone this attribute.
513+
bool canClone() const;
511514
};
512515

513516
#define UNIMPLEMENTED_CLONE(AttrType) \
514517
AttrType *clone(ASTContext &ctx) const { \
515518
llvm_unreachable("unimplemented"); \
516519
return nullptr; \
517-
}
520+
} \
521+
bool canClone() const { return false; }
518522

519523
/// Describes a "simple" declaration attribute that carries no data.
520524
template<DeclAttrKind Kind>
@@ -1916,9 +1920,13 @@ class CustomAttr final : public DeclAttribute {
19161920

19171921
/// Create a copy of this attribute.
19181922
CustomAttr *clone(ASTContext &ctx) const {
1923+
assert(argList == nullptr &&
1924+
"Cannot clone custom attribute with an argument list");
19191925
return create(ctx, AtLoc, getTypeExpr(), initContext, argList, isImplicit());
19201926
}
19211927

1928+
bool canClone() const { return argList == nullptr; }
1929+
19221930
private:
19231931
friend class CustomAttrNominalRequest;
19241932
void resetTypeInformation(TypeExpr *repr);

0 commit comments

Comments
 (0)