Skip to content

Commit 74e158b

Browse files
committed
---
yaml --- r: 343278 b: refs/heads/master-rebranch c: 0e3987a h: refs/heads/master
1 parent 3434a0d commit 74e158b

File tree

323 files changed

+7717
-9564
lines changed

Some content is hidden

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

323 files changed

+7717
-9564
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1455,7 +1455,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2019-08-02-a: ddd2b2976aa9bfde5f20fe37f6bd2
14551455
refs/tags/swift-DEVELOPMENT-SNAPSHOT-2019-08-03-a: 171cc166f2abeb5ca2a4003700a8a78a108bd300
14561456
refs/heads/benlangmuir-patch-1: baaebaf39d52f3bf36710d4fe40cf212e996b212
14571457
refs/heads/i-do-redeclare: 8c4e6d5de5c1e3f0a2cedccf319df713ea22c48e
1458-
refs/heads/master-rebranch: fdfa9d943e5e8b14e8d83e9ee077d3ebaa5a2313
1458+
refs/heads/master-rebranch: 0e3987a4fcba9753bf9c2f47c17126abe762ce23
14591459
refs/heads/rdar-53901732: 9bd06af3284e18a109cdbf9aa59d833b24eeca7b
14601460
refs/heads/revert-26776-subst-always-returns-a-type: 1b8e18fdd391903a348970a4c848995d4cdd789c
14611461
refs/heads/tensorflow-merge: 8b854f62f80d4476cb383d43c4aac2001dde3cec

branches/master-rebranch/cmake/modules/SwiftSource.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,6 @@ function(_compile_swift_files
229229
# The standard library and overlays are always built resiliently.
230230
if(SWIFTFILE_IS_STDLIB)
231231
list(APPEND swift_flags "-enable-library-evolution")
232-
list(APPEND swift_flags "-Xfrontend" "-enable-ownership-stripping-after-serialization")
233232
endif()
234233

235234
if(SWIFT_STDLIB_USE_NONATOMIC_RC)

branches/master-rebranch/include/swift/AST/ASTContext.h

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,6 @@ namespace swift {
112112

113113
enum class KnownProtocolKind : uint8_t;
114114

115-
namespace namelookup {
116-
class ImportCache;
117-
}
118-
119115
namespace syntax {
120116
class SyntaxArena;
121117
}
@@ -687,9 +683,7 @@ class ASTContext final {
687683
/// If there is no Clang module loader, returns a null pointer.
688684
/// The loader is owned by the AST context.
689685
ClangModuleLoader *getDWARFModuleLoader() const;
690-
691-
namelookup::ImportCache &getImportCache() const;
692-
686+
693687
/// Asks every module loader to verify the ASTs it has loaded.
694688
///
695689
/// Does nothing in non-asserts (NDEBUG) builds.
@@ -826,7 +820,7 @@ class ASTContext final {
826820
/// of the given decl context.
827821
///
828822
/// \param IDC The context whose member decls should be lazily parsed.
829-
std::vector<Decl *> parseMembers(IterableDeclContext *IDC);
823+
void parseMembers(IterableDeclContext *IDC);
830824

831825
/// Get the lazy function data for the given generic context.
832826
///

branches/master-rebranch/include/swift/AST/ASTNode.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ namespace swift {
3636
enum class DeclKind : uint8_t;
3737
enum class StmtKind;
3838

39-
struct ASTNode : public llvm::PointerUnion<Expr*, Stmt*, Decl*> {
39+
struct ASTNode : public llvm::PointerUnion3<Expr*, Stmt*, Decl*> {
4040
// Inherit the constructors from PointerUnion.
41-
using PointerUnion::PointerUnion;
42-
41+
using PointerUnion3::PointerUnion3;
42+
4343
SourceRange getSourceRange() const;
4444

4545
/// Return the location of the start of the statement.

branches/master-rebranch/include/swift/AST/ASTTypeIDZone.def

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,8 @@ SWIFT_TYPEID(CtorInitializerKind)
2727
SWIFT_TYPEID(ResilienceExpansion)
2828
SWIFT_TYPEID_NAMED(Optional<PropertyWrapperMutability>, PropertyWrapperMutability)
2929
SWIFT_TYPEID_NAMED(CustomAttr *, CustomAttr)
30-
SWIFT_TYPEID_NAMED(OperatorDecl *, OperatorDecl)
3130
SWIFT_TYPEID_NAMED(TypeAliasDecl *, TypeAliasDecl)
3231
SWIFT_TYPEID(AncestryFlags)
3332
SWIFT_TYPEID_NAMED(GenericSignature *, GenericSignature)
3433
SWIFT_TYPEID_NAMED(GenericTypeParamType *, GenericTypeParamType)
3534
SWIFT_TYPEID(Requirement)
36-
SWIFT_TYPEID_NAMED(IterableDeclContext *, IterableDeclContext)

branches/master-rebranch/include/swift/AST/ASTTypeIDs.h

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,34 +17,29 @@
1717
#ifndef SWIFT_AST_ASTTYPEIDS_H
1818
#define SWIFT_AST_ASTTYPEIDS_H
1919

20-
#include "swift/Basic/LLVM.h"
2120
#include "swift/Basic/TypeID.h"
2221
namespace swift {
2322

2423
class CustomAttr;
25-
class Decl;
2624
class GenericSignature;
2725
class GenericTypeParamType;
28-
class IterableDeclContext;
2926
class NominalTypeDecl;
30-
class OperatorDecl;
3127
struct PropertyWrapperBackingPropertyInfo;
3228
struct PropertyWrapperTypeInfo;
3329
enum class CtorInitializerKind;
3430
struct PropertyWrapperMutability;
35-
class ProtocolDecl;
3631
class Requirement;
37-
enum class ResilienceExpansion : unsigned;
3832
class Type;
39-
class ValueDecl;
4033
class VarDecl;
4134
class TypeAliasDecl;
4235
class Type;
4336
struct TypePair;
4437
enum class AncestryFlags : uint8_t;
4538

39+
#define SWIFT_AST_TYPEID_ZONE 1
40+
4641
// Define the AST type zone (zone 1)
47-
#define SWIFT_TYPEID_ZONE AST
42+
#define SWIFT_TYPEID_ZONE SWIFT_AST_TYPEID_ZONE
4843
#define SWIFT_TYPEID_HEADER "swift/AST/ASTTypeIDZone.def"
4944
#include "swift/Basic/DefineTypeIDZone.h"
5045

branches/master-rebranch/include/swift/AST/AccessRequests.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,21 +97,24 @@ class DefaultAndMaxAccessLevelRequest :
9797
void cacheResult(DefaultAndMax value) const;
9898
};
9999

100-
#define SWIFT_TYPEID_ZONE AccessControl
100+
/// The zone number for access-control requests.
101+
#define SWIFT_ACCESS_REQUESTS_TYPEID_ZONE 11
102+
103+
#define SWIFT_TYPEID_ZONE SWIFT_ACCESS_REQUESTS_TYPEID_ZONE
101104
#define SWIFT_TYPEID_HEADER "swift/AST/AccessTypeIDZone.def"
102105
#include "swift/Basic/DefineTypeIDZone.h"
103106
#undef SWIFT_TYPEID_ZONE
104107
#undef SWIFT_TYPEID_HEADER
105108

106109
// Set up reporting of evaluated requests.
107-
#define SWIFT_REQUEST(Zone, RequestType) \
110+
#define SWIFT_TYPEID(RequestType) \
108111
template<> \
109112
inline void reportEvaluatedRequest(UnifiedStatsReporter &stats, \
110113
const RequestType &request) { \
111114
++stats.getFrontendCounters().RequestType; \
112115
}
113116
#include "swift/AST/AccessTypeIDZone.def"
114-
#undef SWIFT_REQUEST
117+
#undef SWIFT_TYPEID
115118

116119
} // end namespace swift
117120

branches/master-rebranch/include/swift/AST/AccessTypeIDZone.def

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
// TypeID zone, for use with the TypeID template.
1515
//
1616
//===----------------------------------------------------------------------===//
17-
18-
SWIFT_REQUEST(AccessControl, AccessLevelRequest)
19-
SWIFT_REQUEST(AccessControl, DefaultAndMaxAccessLevelRequest)
20-
SWIFT_REQUEST(AccessControl, SetterAccessLevelRequest)
17+
SWIFT_TYPEID(AccessLevelRequest)
18+
SWIFT_TYPEID(SetterAccessLevelRequest)
19+
SWIFT_TYPEID(DefaultAndMaxAccessLevelRequest)

branches/master-rebranch/include/swift/AST/Attr.def

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,8 @@ SIMPLE_DECL_ATTR(_weakLinked, WeakLinked,
362362
OnSubscript | OnConstructor | OnEnumElement | OnExtension | UserInaccessible,
363363
75)
364364
SIMPLE_DECL_ATTR(frozen, Frozen,
365-
OnEnum | OnStruct,
365+
OnEnum | OnStruct |
366+
UserInaccessible,
366367
76)
367368
DECL_ATTR_ALIAS(_frozen, Frozen)
368369
SIMPLE_DECL_ATTR(_forbidSerializingReference, ForbidSerializingReference,

branches/master-rebranch/include/swift/AST/Builtins.def

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -418,14 +418,6 @@ BUILTIN_MISC_OPERATION(Strideof, "strideof", "n", Special)
418418
/// IsPOD has type T.Type -> Bool
419419
BUILTIN_MISC_OPERATION(IsPOD, "ispod", "n", Special)
420420

421-
/// IsConcrete has type (T.Type) -> Bool
422-
///
423-
/// If the meta type T is concrete, we can always transform this to `true` at
424-
/// any time in SIL. If it's generic, then we lower it to `false` right before
425-
/// IRGen in IRGenPrepare. This allows for the optimizer to specialize this at
426-
/// -O and eliminate conditional code.
427-
BUILTIN_MISC_OPERATION(IsConcrete, "isConcrete", "n", Special)
428-
429421
/// IsBitwiseTakable has type T.Type -> Bool
430422
BUILTIN_MISC_OPERATION(IsBitwiseTakable, "isbitwisetakable", "n", Special)
431423

branches/master-rebranch/include/swift/AST/Decl.h

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4789,7 +4789,7 @@ class VarDecl : public AbstractStorageDecl {
47894789
};
47904790

47914791
protected:
4792-
PointerUnion<PatternBindingDecl *, Stmt *, VarDecl *> Parent;
4792+
PointerUnion3<PatternBindingDecl *, Stmt *, VarDecl *> Parent;
47934793

47944794
VarDecl(DeclKind kind, bool isStatic, Introducer introducer,
47954795
bool issCaptureList, SourceLoc nameLoc, Identifier name,
@@ -5926,6 +5926,7 @@ class FuncDecl : public AbstractFunctionDecl {
59265926

59275927
TypeLoc FnRetType;
59285928

5929+
OperatorDecl *Operator = nullptr;
59295930
OpaqueTypeDecl *OpaqueReturn = nullptr;
59305931

59315932
protected:
@@ -6072,7 +6073,13 @@ class FuncDecl : public AbstractFunctionDecl {
60726073
return cast_or_null<FuncDecl>(AbstractFunctionDecl::getOverriddenDecl());
60736074
}
60746075

6075-
OperatorDecl *getOperatorDecl() const;
6076+
OperatorDecl *getOperatorDecl() const {
6077+
return Operator;
6078+
}
6079+
void setOperatorDecl(OperatorDecl *o) {
6080+
assert(isOperator() && "can't set an OperatorDecl for a non-operator");
6081+
Operator = o;
6082+
}
60766083

60776084
OpaqueTypeDecl *getOpaqueResultTypeDecl() const {
60786085
return OpaqueReturn;
@@ -7248,17 +7255,6 @@ void simple_display(llvm::raw_ostream &out, const Decl *decl);
72487255
/// Display ValueDecl subclasses.
72497256
void simple_display(llvm::raw_ostream &out, const ValueDecl *decl);
72507257

7251-
/// Display ExtensionDecls.
7252-
inline void simple_display(llvm::raw_ostream &out, const ExtensionDecl *decl) {
7253-
simple_display(out, static_cast<const Decl *>(decl));
7254-
}
7255-
7256-
/// Display NominalTypeDecls.
7257-
inline void simple_display(llvm::raw_ostream &out,
7258-
const NominalTypeDecl *decl) {
7259-
simple_display(out, static_cast<const Decl *>(decl));
7260-
}
7261-
72627258
/// Extract the source location from the given declaration.
72637259
SourceLoc extractNearestSourceLoc(const Decl *decl);
72647260

@@ -7272,11 +7268,6 @@ inline SourceLoc extractNearestSourceLoc(const GenericTypeDecl *type) {
72727268
return extractNearestSourceLoc(static_cast<const Decl *>(type));
72737269
}
72747270

7275-
/// Extract the source location from the given declaration.
7276-
inline SourceLoc extractNearestSourceLoc(const NominalTypeDecl *type) {
7277-
return extractNearestSourceLoc(static_cast<const Decl *>(type));
7278-
}
7279-
72807271
/// Extract the source location from the given declaration.
72817272
inline SourceLoc extractNearestSourceLoc(const AbstractFunctionDecl *func) {
72827273
return extractNearestSourceLoc(static_cast<const Decl *>(func));

branches/master-rebranch/include/swift/AST/DeclContext.h

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -699,8 +699,8 @@ class IterableDeclContext {
699699
/// time, but I think it's a better trade to just keep a count here.
700700
unsigned MemberCount : 29;
701701

702-
/// Whether we have already added the parsed members into the context.
703-
unsigned AddedParsedMembers : 1;
702+
/// Whether parsing the members of this context has been delayed.
703+
unsigned HasUnparsedMembers : 1;
704704

705705
/// Whether delayed parsing detected a possible operator definition
706706
/// while skipping the body of this context.
@@ -722,8 +722,8 @@ class IterableDeclContext {
722722
IterableDeclContext(IterableDeclContextKind kind)
723723
: LastDeclAndKind(nullptr, kind) {
724724
MemberCount = 0;
725-
AddedParsedMembers = 0;
726725
HasOperatorDeclarations = 0;
726+
HasUnparsedMembers = 0;
727727
HasNestedClassDeclarations = 0;
728728
}
729729

@@ -732,7 +732,13 @@ class IterableDeclContext {
732732
return LastDeclAndKind.getInt();
733733
}
734734

735-
bool hasUnparsedMembers() const;
735+
bool hasUnparsedMembers() const {
736+
return HasUnparsedMembers;
737+
}
738+
739+
void setHasUnparsedMembers() {
740+
HasUnparsedMembers = 1;
741+
}
736742

737743
bool maybeHasOperatorDeclarations() const {
738744
return HasOperatorDeclarations;
@@ -833,14 +839,9 @@ void simple_display(llvm::raw_ostream &out, const ParamT *dc) {
833839
out << "(null)";
834840
}
835841

836-
void simple_display(llvm::raw_ostream &out, const IterableDeclContext *idc);
837-
838842
/// Extract the source location from the given declaration context.
839843
SourceLoc extractNearestSourceLoc(const DeclContext *dc);
840844

841-
/// Extract the source location from the given declaration context.
842-
SourceLoc extractNearestSourceLoc(const IterableDeclContext *idc);
843-
844845
} // end namespace swift
845846

846847
namespace llvm {

branches/master-rebranch/include/swift/AST/DiagnosticsClangImporter.def

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ WARNING(implicit_bridging_header_imported_from_module,none,
9191
"is deprecated and will be removed in a later version of Swift",
9292
(StringRef, Identifier))
9393

94+
WARNING(clang_vfs_overlay_is_ignored,none,
95+
"ignoring '-ivfsoverlay' options provided to '-Xcc' in favor of "
96+
"'-vfsoverlay'", ())
97+
9498
#ifndef DIAG_NO_UNDEF
9599
# if defined(DIAG)
96100
# undef DIAG

branches/master-rebranch/include/swift/AST/DiagnosticsModuleDiffer.def

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,6 @@ ERROR(decl_new_witness_table_entry,none,"%0 now requires %select{|no}1 new witne
9696

9797
ERROR(new_decl_without_intro,none,"%0 is a new API without @available attribute", (StringRef))
9898

99-
ERROR(objc_name_change,none,"%0 has ObjC name change from %1 to %2", (StringRef, StringRef, StringRef))
100-
10199
#ifndef DIAG_NO_UNDEF
102100
# if defined(DIAG)
103101
# undef DIAG

branches/master-rebranch/include/swift/AST/DiagnosticsSema.def

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1836,16 +1836,16 @@ ERROR(protocol_access,none,
18361836
"|private or fileprivate}4 because %select{it refines|its 'where' clause uses}2"
18371837
"|%select{in this context|fileprivate|internal|public|%error}1 "
18381838
"%select{protocol cannot refine|protocol's 'where' clause cannot use}2}0 "
1839-
"%select{a private|a fileprivate|an internal|%error|%error}3 %5",
1840-
(bool, AccessLevel, bool, AccessLevel, bool, DescriptiveDeclKind))
1839+
"%select{a private|a fileprivate|an internal|%error|%error}3 protocol",
1840+
(bool, AccessLevel, bool, AccessLevel, bool))
18411841
WARNING(protocol_access_warn,none,
18421842
"%select{protocol should be declared "
18431843
"%select{private|fileprivate|internal|%error|%error}1 because "
18441844
"%select{it refines|its 'where' clause uses}2"
18451845
"|%select{in this context|fileprivate|internal|public|%error}1 "
18461846
"%select{protocol should not refine|protocol's 'where' clause should not use}2}0 "
1847-
"%select{a private|a fileprivate|an internal|%error|%error}3 %5",
1848-
(bool, AccessLevel, bool, AccessLevel, bool, DescriptiveDeclKind))
1847+
"%select{a private|a fileprivate|an internal|%error|%error}3 protocol",
1848+
(bool, AccessLevel, bool, AccessLevel, bool))
18491849
ERROR(protocol_usable_from_inline,none,
18501850
"protocol %select{refined|used}0 by '@usableFromInline' protocol "
18511851
"must be '@usableForInline' or public", (bool))

branches/master-rebranch/include/swift/AST/Evaluator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ class Evaluator {
249249
///
250250
/// These functions will be called to evaluate any requests within that
251251
/// zone.
252-
void registerRequestFunctions(Zone zone,
252+
void registerRequestFunctions(uint8_t zoneID,
253253
ArrayRef<AbstractRequestFunction *> functions);
254254

255255
/// Evaluate the given request and produce its result,

branches/master-rebranch/include/swift/AST/GenericSignatureBuilder.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ class GenericSignatureBuilder {
9292
class ResolvedType;
9393

9494
using UnresolvedRequirementRHS =
95-
llvm::PointerUnion<Type, PotentialArchetype *, LayoutConstraint>;
95+
llvm::PointerUnion3<Type, PotentialArchetype *, LayoutConstraint>;
9696

9797
using RequirementRHS =
98-
llvm::PointerUnion<Type, PotentialArchetype *, LayoutConstraint>;
98+
llvm::PointerUnion3<Type, PotentialArchetype *, LayoutConstraint>;
9999

100100
/// The location of a requirement as written somewhere in the source.
101101
typedef llvm::PointerUnion<const TypeRepr *, const RequirementRepr *>
@@ -1374,8 +1374,8 @@ class GenericSignatureBuilder::FloatingRequirementSource {
13741374
} kind;
13751375

13761376
using Storage =
1377-
llvm::PointerUnion<const RequirementSource *, const TypeRepr *,
1378-
const RequirementRepr *>;
1377+
llvm::PointerUnion3<const RequirementSource *, const TypeRepr *,
1378+
const RequirementRepr *>;
13791379

13801380
Storage storage;
13811381

0 commit comments

Comments
 (0)