Skip to content

Commit 4d8283d

Browse files
committed
---
yaml --- r: 340791 b: refs/heads/rxwei-patch-1 c: 7696a76 h: refs/heads/master i: 340789: b919e96 340787: 4a21a46 340783: a62d797
1 parent 2678a18 commit 4d8283d

File tree

199 files changed

+850
-4761
lines changed

Some content is hidden

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

199 files changed

+850
-4761
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-08-18-a: b10b1fce14385faa6d44f6b933e95
10151015
refs/heads/rdar-43033749-fix-batch-mode-no-diags-swift-5.0-branch: a14e64eaad30de89f0f5f0b2a782eed7ecdcb255
10161016
refs/heads/revert-19006-error-bridging-integer-type: 8a9065a3696535305ea53fe9b71f91cbe6702019
10171017
refs/heads/revert-19050-revert-19006-error-bridging-integer-type: ecf752d54b05dd0a20f510f0bfa54a3fec3bcaca
1018-
refs/heads/rxwei-patch-1: a1b281135ac510ef87304aa6041aa42ea8086570
1018+
refs/heads/rxwei-patch-1: 7696a76577c685e7cc806efdcf685fd7637f4b2f
10191019
refs/heads/shahmishal-patch-1: e58ec0f7488258d42bef51bc3e6d7b3dc74d7b2a
10201020
refs/heads/typelist-existential: 4046359efd541fb5c72d69a92eefc0a784df8f5e
10211021
refs/tags/swift-4.2-DEVELOPMENT-SNAPSHOT-2018-08-20-a: 4319ba09e4fb8650ee86061075c74a016b6baab9

branches/rxwei-patch-1/cmake/modules/AddSwift.cmake

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -462,10 +462,10 @@ function(_add_variant_link_flags)
462462
list(APPEND link_libraries "bsd" "atomic")
463463
list(APPEND result "-Wl,-Bsymbolic")
464464
elseif("${LFLAGS_SDK}" STREQUAL "ANDROID")
465-
list(APPEND link_libraries "dl" "log" "atomic")
466-
# We need to add the math library, which is linked implicitly by libc++
467-
list(APPEND result "-lm")
468-
465+
list(APPEND link_libraries "dl" "log" "atomic" "icudataswift" "icui18nswift" "icuucswift")
466+
# We provide our own C++ below, so we ask the linker not to do it. However,
467+
# we need to add the math library, which is linked implicitly by libc++.
468+
list(APPEND result "-nostdlib++" "-lm")
469469
if("${LFLAGS_ARCH}" MATCHES armv7)
470470
set(android_libcxx_path "${SWIFT_ANDROID_NDK_PATH}/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a")
471471
elseif("${LFLAGS_ARCH}" MATCHES aarch64)
@@ -477,17 +477,8 @@ function(_add_variant_link_flags)
477477
else()
478478
message(SEND_ERROR "unknown architecture (${LFLAGS_ARCH}) for android")
479479
endif()
480-
481-
# link against the custom C++ library
482-
list(APPEND link_libraries
483-
${android_libcxx_path}/libc++abi.a
484-
${android_libcxx_path}/libc++_shared.so)
485-
486-
# link against the ICU libraries
487-
list(APPEND link_libraries
488-
${SWIFT_ANDROID_${LFLAGS_ARCH}_ICU_I18N}
489-
${SWIFT_ANDROID_${LFLAGS_ARCH}_ICU_UC})
490-
480+
list(APPEND link_libraries "${android_libcxx_path}/libc++abi.a")
481+
list(APPEND link_libraries "${android_libcxx_path}/libc++_shared.so")
491482
swift_android_lib_for_arch(${LFLAGS_ARCH} ${LFLAGS_ARCH}_LIB)
492483
foreach(path IN LISTS ${LFLAGS_ARCH}_LIB)
493484
list(APPEND library_search_directories ${path})
@@ -1380,16 +1371,8 @@ function(_add_swift_library_single target name)
13801371
${SWIFTLIB_SINGLE_PRIVATE_LINK_LIBRARIES})
13811372
endif()
13821373

1383-
# NOTE(compnerd) use the C linker language to invoke `clang` rather than
1384-
# `clang++` as we explicitly link against the C++ runtime. We were previously
1385-
# actually passing `-nostdlib++` to avoid the C++ runtime linkage.
1386-
if("${SWIFTLIB_SINGLE_SDK}" STREQUAL "ANDROID")
1387-
set_property(TARGET "${target}" PROPERTY
1388-
LINKER_LANGUAGE "C")
1389-
else()
1390-
set_property(TARGET "${target}" PROPERTY
1374+
set_property(TARGET "${target}" PROPERTY
13911375
LINKER_LANGUAGE "CXX")
1392-
endif()
13931376

13941377
if(target_static)
13951378
set_property(TARGET "${target_static}" APPEND_STRING PROPERTY

branches/rxwei-patch-1/cmake/modules/SwiftSource.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,6 @@ function(_compile_swift_files
269269
# into the new runtime.
270270
if (SWIFTFILE_IS_STDLIB OR SWIFTFILE_IS_SDK_OVERLAY)
271271
list(APPEND swift_flags "-runtime-compatibility-version" "none")
272-
list(APPEND swift_flags "-disable-autolinking-runtime-compatibility-dynamic-replacements")
273272
endif()
274273

275274
if (SWIFTFILE_IS_STDLIB_CORE OR SWIFTFILE_IS_SDK_OVERLAY)

branches/rxwei-patch-1/docs/WindowsBuild.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,8 @@ cmake -G Ninja^
355355
-DFOUNDATION_BUILD_DIR=S:\b\foundation^
356356
-DLIBDISPATCH_BUILD_DIR=S:\b\libdispatch^
357357
-DLIBDISPATCH_SOURCE_DIR=S:\swift-corelibs-libdispatch^
358-
-DSQLite3_INCLUDE_DIR=S:\sqlite-amalgamation-3270200^
359-
-DSQLite3_LIBRARY=S:\b\sqlite\sqlite3.lib^
358+
-DLLBUILD_PATH_TO_SQLITE_SOURCE=S:\sqlite-amalgamation-3270200^
359+
-DLLBUILD_PATH_TO_SQLITE_BUILD=S:\b\sqlite^
360360
-DLLBUILD_SUPPORT_BINDINGS=Swift^
361361
S:\llbuild
362362
ninja

branches/rxwei-patch-1/include/swift/AST/ASTContext.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -590,10 +590,6 @@ class ASTContext final {
590590
/// Get the runtime availability of the opaque types language feature for the target platform.
591591
AvailabilityContext getOpaqueTypeAvailability();
592592

593-
/// Get the runtime availability of features introduced in the Swift 5.1
594-
/// compiler for the target platform.
595-
AvailabilityContext getSwift51Availability();
596-
597593
//===--------------------------------------------------------------------===//
598594
// Diagnostics Helper functions
599595
//===--------------------------------------------------------------------===//

branches/rxwei-patch-1/include/swift/AST/Decl.h

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ class alignas(1 << DeclAlignInBits) Decl {
605605
HasAnyUnavailableValues : 1
606606
);
607607

608-
SWIFT_INLINE_BITFIELD(ModuleDecl, TypeDecl, 1+1+1+1+1+1+1+1,
608+
SWIFT_INLINE_BITFIELD(ModuleDecl, TypeDecl, 1+1+1+1+1+1+1,
609609
/// If the module was or is being compiled with `-enable-testing`.
610610
TestingEnabled : 1,
611611

@@ -620,18 +620,14 @@ class alignas(1 << DeclAlignInBits) Decl {
620620
/// Whether all imports have been resolved. Used to detect circular imports.
621621
HasResolvedImports : 1,
622622

623-
/// If the module was or is being compiled with `-enable-private-imports`.
623+
// If the module was or is being compiled with `-enable-private-imports`.
624624
PrivateImportsEnabled : 1,
625625

626-
/// If the module is compiled with `-enable-implicit-dynamic`.
626+
// If the module is compiled with `-enable-implicit-dynamic`.
627627
ImplicitDynamicEnabled : 1,
628628

629-
/// Whether the module is a system module.
630-
IsSystemModule : 1,
631-
632-
/// Whether the module was imported from Clang (or, someday, maybe another
633-
/// language).
634-
IsNonSwiftModule : 1
629+
// Whether the module is a system module.
630+
IsSystemModule : 1
635631
);
636632

637633
SWIFT_INLINE_BITFIELD(PrecedenceGroupDecl, Decl, 1+2,
@@ -2700,11 +2696,7 @@ class ValueDecl : public Decl {
27002696
/// True if this is a C function that was imported as a member of a type in
27012697
/// Swift.
27022698
bool isImportAsMember() const;
2703-
2704-
/// Returns true if the declaration's interface type is a function type with a
2705-
/// curried self parameter.
2706-
bool hasCurriedSelf() const;
2707-
2699+
27082700
/// Get the decl for this value's opaque result type, if it has one.
27092701
OpaqueTypeDecl *getOpaqueResultTypeDecl() const;
27102702

@@ -7193,14 +7185,6 @@ inline bool ValueDecl::isImportAsMember() const {
71937185
return false;
71947186
}
71957187

7196-
inline bool ValueDecl::hasCurriedSelf() const {
7197-
if (auto *afd = dyn_cast<AbstractFunctionDecl>(this))
7198-
return afd->hasImplicitSelfDecl();
7199-
if (isa<EnumElementDecl>(this))
7200-
return true;
7201-
return false;
7202-
}
7203-
72047188
inline bool Decl::isPotentiallyOverridable() const {
72057189
if (isa<VarDecl>(this) ||
72067190
isa<SubscriptDecl>(this) ||

branches/rxwei-patch-1/include/swift/AST/DiagnosticsCommon.def

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ NOTE(note_typo_candidate,none,
101101
NOTE(profile_read_error,none,
102102
"failed to load profile data '%0': '%1'", (StringRef, StringRef))
103103

104+
ERROR(generic_signature_not_minimal,none,
105+
"generic requirement '%0' is redundant in %1", (StringRef, StringRef))
106+
104107
WARNING(protocol_extension_redundant_requirement,none,
105108
"requirement of '%1' to '%2' is redundant in an extension of '%0'",
106109
(StringRef, StringRef, StringRef))
@@ -111,15 +114,6 @@ ERROR(attr_only_on_parameters, none,
111114
ERROR(function_type_no_parens,none,
112115
"single argument function types require parentheses", ())
113116

114-
// Used by -verify-generic-signatures
115-
ERROR(generic_signature_not_minimal,none,
116-
"generic requirement '%0' is redundant in %1", (StringRef, StringRef))
117-
ERROR(generic_signature_not_valid,none,
118-
"generic signature %0 is invalid", (StringRef))
119-
ERROR(generic_signature_not_equal,none,
120-
"generic signature %0 is not equal to new signature %1",
121-
(StringRef, StringRef))
122-
123117
// FIXME: Used by swift-api-digester. Don't want to set up a separate diagnostics
124118
// file just for a few errors.
125119
ERROR(sdk_node_unrecognized_key,none,

branches/rxwei-patch-1/include/swift/AST/DiagnosticsSema.def

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -792,11 +792,6 @@ ERROR(module_not_compiled_for_private_import,none,
792792
ERROR(import_implementation_cannot_be_exported,none,
793793
"module %0 cannot be both exported and implementation-only", (Identifier))
794794

795-
WARNING(module_not_compiled_with_library_evolution,none,
796-
"module %0 was not compiled with library evolution support; "
797-
"using it means binary compatibility for %1 can't be guaranteed",
798-
(Identifier, Identifier))
799-
800795

801796
// Operator decls
802797
ERROR(ambiguous_operator_decls,none,
@@ -4157,9 +4152,6 @@ ERROR(availability_protocol_requires_version,
41574152
NOTE(availability_protocol_requirement_here, none,
41584153
"protocol requirement here", ())
41594154

4160-
WARNING(public_decl_needs_availability, none,
4161-
"public declarations should have an availability attribute with -require-explicit-availability", ())
4162-
41634155
// This doesn't display as an availability diagnostic, but it's
41644156
// implemented there and fires when these subscripts are marked
41654157
// unavailable, so it seems appropriate to put it here.

branches/rxwei-patch-1/include/swift/AST/Expr.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2126,6 +2126,8 @@ class CollectionExpr : public Expr {
21262126
SourceLoc RBracketLoc;
21272127
ConcreteDeclRef Initializer;
21282128

2129+
Expr *SemanticExpr = nullptr;
2130+
21292131
/// Retrieve the intrusive pointer storage from the subtype
21302132
Expr *const *getTrailingObjectsPointer() const;
21312133
Expr **getTrailingObjectsPointer() {
@@ -2190,6 +2192,9 @@ class CollectionExpr : public Expr {
21902192
SourceRange getSourceRange() const {
21912193
return SourceRange(LBracketLoc, RBracketLoc);
21922194
}
2195+
2196+
Expr *getSemanticExpr() const { return SemanticExpr; }
2197+
void setSemanticExpr(Expr *e) { SemanticExpr = e; }
21932198

21942199
static bool classof(const Expr *e) {
21952200
return e->getKind() >= ExprKind::First_CollectionExpr &&
@@ -2267,8 +2272,6 @@ class DictionaryExpr final : public CollectionExpr,
22672272
static bool classof(const Expr *e) {
22682273
return e->getKind() == ExprKind::Dictionary;
22692274
}
2270-
2271-
Type getElementType();
22722275
};
22732276

22742277
/// Subscripting expressions like a[i] that refer to an element within a

branches/rxwei-patch-1/include/swift/AST/IRGenOptions.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,6 @@ class IRGenOptions {
228228

229229
/// Pull in runtime compatibility shim libraries by autolinking.
230230
Optional<llvm::VersionTuple> AutolinkRuntimeCompatibilityLibraryVersion;
231-
Optional<llvm::VersionTuple> AutolinkRuntimeCompatibilityDynamicReplacementLibraryVersion;
232231

233232
IRGenOptions()
234233
: DWARFVersion(2), OutputKind(IRGenOutputKind::LLVMAssembly),

branches/rxwei-patch-1/include/swift/AST/Module.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -337,18 +337,6 @@ class ModuleDecl : public DeclContext, public TypeDecl {
337337
Bits.ModuleDecl.IsSystemModule = flag;
338338
}
339339

340-
/// Returns true if this module is a non-Swift module that was imported into
341-
/// Swift.
342-
///
343-
/// Right now that's just Clang modules.
344-
bool isNonSwiftModule() const {
345-
return Bits.ModuleDecl.IsNonSwiftModule;
346-
}
347-
/// \see #isNonSwiftModule
348-
void setIsNonSwiftModule(bool flag = true) {
349-
Bits.ModuleDecl.IsNonSwiftModule = flag;
350-
}
351-
352340
bool isResilient() const {
353341
return getResilienceStrategy() != ResilienceStrategy::Default;
354342
}

branches/rxwei-patch-1/include/swift/AST/PrintOptions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ struct PrintOptions {
494494
/// consistent and well-formed.
495495
///
496496
/// \see swift::emitParseableInterface
497-
static PrintOptions printParseableInterfaceFile(bool preferTypeRepr);
497+
static PrintOptions printParseableInterfaceFile();
498498

499499
static PrintOptions printModuleInterface();
500500
static PrintOptions printTypeInterface(Type T);

branches/rxwei-patch-1/include/swift/Basic/LangOptions.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,6 @@ namespace swift {
9696
/// Enable 'availability' restrictions for App Extensions.
9797
bool EnableAppExtensionRestrictions = false;
9898

99-
/// Require public declarations to declare an introduction OS version.
100-
bool RequireExplicitAvailability = false;
101-
102-
/// Introduction platform and version to suggest as fix-it
103-
/// when using RequireExplicitAvailability.
104-
std::string RequireExplicitAvailabilityTarget;
105-
10699
///
107100
/// Support for alternate usage modes
108101
///

branches/rxwei-patch-1/include/swift/Frontend/ParseableInterfaceSupport.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ class ModuleDecl;
2727

2828
/// Options for controlling the generation of the .swiftinterface output.
2929
struct ParseableInterfaceOptions {
30-
/// Should we prefer printing TypeReprs when writing out types in a module
31-
/// interface, or should we fully-qualify them?
32-
bool PreserveTypesAsWritten = false;
33-
3430
/// Copy of all the command-line flags passed at .swiftinterface
3531
/// generation time, re-applied to CompilerInvocation when reading
3632
/// back .swiftinterface and reconstructing .swiftmodule.

branches/rxwei-patch-1/include/swift/Option/FrontendOptions.td

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -535,11 +535,6 @@ def build_module_from_parseable_interface :
535535
Alias<compile_module_from_interface>,
536536
ModeOpt;
537537

538-
def module_interface_preserve_types_as_written :
539-
Flag<["-"], "module-interface-preserve-types-as-written">,
540-
HelpText<"When emitting a module interface, preserve types as they were "
541-
"written in the source">;
542-
543538
def prebuilt_module_cache_path :
544539
Separate<["-"], "prebuilt-module-cache-path">,
545540
HelpText<"Directory of prebuilt modules for loading module interfaces">;

branches/rxwei-patch-1/include/swift/Option/Options.td

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -312,14 +312,6 @@ def enable_library_evolution : Flag<["-"], "enable-library-evolution">,
312312
Flags<[FrontendOption, ModuleInterfaceOption]>,
313313
HelpText<"Build the module to allow binary-compatible library evolution">;
314314

315-
def require_explicit_availability : Flag<["-"], "require-explicit-availability">,
316-
Flags<[FrontendOption, NoInteractiveOption]>,
317-
HelpText<"Require explicit availability on public declarations">;
318-
def require_explicit_availability_target : Separate<["-"], "require-explicit-availability-target">,
319-
Flags<[FrontendOption, NoInteractiveOption]>,
320-
HelpText<"Suggest fix-its adding @available(<target>, *) to public declarations without availability">,
321-
MetaVarName<"<target>">;
322-
323315
def module_name : Separate<["-"], "module-name">,
324316
Flags<[FrontendOption, ModuleInterfaceOption]>,
325317
HelpText<"Name of the module to build">;
@@ -912,10 +904,4 @@ def disable_autolinking_runtime_compatibility : Flag<["-"], "disable-autolinking
912904
Flags<[FrontendOption]>,
913905
HelpText<"Do not use autolinking for runtime compatibility libraries">;
914906

915-
def disable_autolinking_runtime_compatibility_dynamic_replacements
916-
: Flag<[ "-" ], "disable-autolinking-runtime-compatibility-dynamic-replacements">,
917-
Flags<[ FrontendOption ]>,
918-
HelpText<"Do not use autolinking for the dynamic replacement runtime "
919-
"compatibility library">;
920-
921907
include "FrontendOptions.td"

branches/rxwei-patch-1/include/swift/Runtime/Exclusivity.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,13 @@ void swift_beginAccess(void *pointer, ValueBuffer *buffer,
4444
/// replacement function if it should be called.
4545
/// Returns null if the original function (which is passed in \p CurrFn) should
4646
/// be called.
47-
#ifdef __APPLE__
48-
__attribute__((weak_import))
49-
#endif
5047
SWIFT_RUNTIME_EXPORT
5148
char *swift_getFunctionReplacement(char **ReplFnPtr, char *CurrFn);
5249

5350
/// Returns the original function of a replaced function, which is loaded from
5451
/// \p OrigFnPtr.
5552
/// This function is called from a replacement function to call the original
5653
/// function.
57-
#ifdef __APPLE__
58-
__attribute__((weak_import))
59-
#endif
6054
SWIFT_RUNTIME_EXPORT
6155
char *swift_getOrigOfReplaceable(char **OrigFnPtr);
6256

branches/rxwei-patch-1/include/swift/Runtime/RuntimeFnWrappersGen.h

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,6 @@
2222
namespace swift {
2323

2424
class AvailabilityContext;
25-
class ASTContext;
26-
27-
enum class RuntimeAvailability {
28-
AlwaysAvailable,
29-
AvailableByCompatibilityLibrary,
30-
ConditionallyAvailable
31-
};
3225

3326
/// Generate an llvm declaration for a runtime entry with a
3427
/// given name, return types, argument types, attributes and
@@ -37,8 +30,7 @@ llvm::Constant *getRuntimeFn(llvm::Module &Module,
3730
llvm::Constant *&cache,
3831
char const *name,
3932
llvm::CallingConv::ID cc,
40-
RuntimeAvailability availability,
41-
ASTContext *context,
33+
bool isWeakLinked,
4234
llvm::ArrayRef<llvm::Type*> retTypes,
4335
llvm::ArrayRef<llvm::Type*> argTypes,
4436
llvm::ArrayRef<llvm::Attribute::AttrKind> attrs);

0 commit comments

Comments
 (0)