Skip to content

Commit 45ed396

Browse files
committed
---
yaml --- r: 343539 b: refs/heads/master-rebranch c: 7277f4f h: refs/heads/master i: 343537: b01a587 343535: 02c6ab9
1 parent a18ba29 commit 45ed396

File tree

207 files changed

+2031
-2587
lines changed

Some content is hidden

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

207 files changed

+2031
-2587
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: 0b7772d32b1f9cfddfbb42aea28c71a2f8350e3f
1458+
refs/heads/master-rebranch: 7277f4f4ed4d1a3463d73d325f0845f37c1ffe2f
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/docs/ABI/Mangling.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -551,11 +551,6 @@ Types
551551
type ::= assoc-type-name 'Qz' // shortcut for 'Qyz'
552552
type ::= assoc-type-list 'QY' GENERIC-PARAM-INDEX // associated type at depth
553553
type ::= assoc-type-list 'QZ' // shortcut for 'QYz'
554-
555-
#if SWIFT_RUNTIME_VERSION >= 5.2
556-
type ::= type assoc-type-name 'Qx' // associated type relative to base `type`
557-
type ::= type assoc-type-list 'QX' // associated type relative to base `type`
558-
#endif
559554

560555
protocol-list ::= protocol '_' protocol*
561556
protocol-list ::= empty-list

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#ifndef SWIFT_AST_ASTCONTEXT_H
1818
#define SWIFT_AST_ASTCONTEXT_H
1919

20+
#include "swift/AST/ClangModuleLoader.h"
2021
#include "swift/AST/Evaluator.h"
2122
#include "swift/AST/GenericSignature.h"
2223
#include "swift/AST/Identifier.h"
@@ -31,7 +32,6 @@
3132
#include "llvm/ADT/MapVector.h"
3233
#include "llvm/ADT/PointerIntPair.h"
3334
#include "llvm/ADT/SetVector.h"
34-
#include "llvm/ADT/SmallPtrSet.h"
3535
#include "llvm/ADT/StringMap.h"
3636
#include "llvm/ADT/TinyPtrVector.h"
3737
#include "llvm/Support/Allocator.h"
@@ -49,12 +49,10 @@ namespace clang {
4949
}
5050

5151
namespace swift {
52-
class AbstractFunctionDecl;
5352
class ASTContext;
5453
enum class Associativity : unsigned char;
5554
class AvailabilityContext;
5655
class BoundGenericType;
57-
class ClangModuleLoader;
5856
class ClangNode;
5957
class ConcreteDeclRef;
6058
class ConstructorDecl;

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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ SWIFT_TYPEID_NAMED(VarDecl *, VarDecl)
1919
SWIFT_TYPEID_NAMED(ValueDecl *, ValueDecl)
2020
SWIFT_TYPEID_NAMED(ProtocolDecl *, ProtocolDecl)
2121
SWIFT_TYPEID_NAMED(Decl *, Decl)
22-
SWIFT_TYPEID_NAMED(ModuleDecl *, ModuleDecl)
2322
SWIFT_TYPEID(Type)
2423
SWIFT_TYPEID(TypePair)
2524
SWIFT_TYPEID(PropertyWrapperBackingPropertyInfo)

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ class Decl;
2626
class GenericSignature;
2727
class GenericTypeParamType;
2828
class IterableDeclContext;
29-
class ModuleDecl;
3029
class NominalTypeDecl;
3130
class OperatorDecl;
3231
struct PropertyWrapperBackingPropertyInfo;

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,14 @@ class SetterAccessLevelRequest :
7575
void cacheResult(AccessLevel value) const;
7676
};
7777

78-
using DefaultAndMax = std::pair<AccessLevel, AccessLevel>;
79-
8078
/// Request the Default and Max AccessLevels of the given ExtensionDecl.
8179
class DefaultAndMaxAccessLevelRequest :
8280
public SimpleRequest<DefaultAndMaxAccessLevelRequest,
83-
DefaultAndMax(ExtensionDecl *),
81+
std::pair<AccessLevel, AccessLevel>(ExtensionDecl *),
8482
CacheKind::SeparatelyCached> {
8583
public:
8684
using SimpleRequest::SimpleRequest;
85+
using DefaultAndMax = std::pair<AccessLevel, AccessLevel>;
8786
private:
8887
friend SimpleRequest;
8988

@@ -105,7 +104,7 @@ class DefaultAndMaxAccessLevelRequest :
105104
#undef SWIFT_TYPEID_HEADER
106105

107106
// Set up reporting of evaluated requests.
108-
#define SWIFT_REQUEST(Zone, RequestType, Sig, Caching) \
107+
#define SWIFT_REQUEST(Zone, RequestType) \
109108
template<> \
110109
inline void reportEvaluatedRequest(UnifiedStatsReporter &stats, \
111110
const RequestType &request) { \

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
//
1616
//===----------------------------------------------------------------------===//
1717

18-
SWIFT_REQUEST(AccessControl, AccessLevelRequest, AccessLevel(ValueDecl *),
19-
SeparatelyCached)
20-
SWIFT_REQUEST(AccessControl, DefaultAndMaxAccessLevelRequest,
21-
DefaultAndMax(ExtensionDecl *), SeparatelyCached)
22-
SWIFT_REQUEST(AccessControl, SetterAccessLevelRequest,
23-
AccessLevel(AbstractStorageDecl *), SeparatelyCached)
18+
SWIFT_REQUEST(AccessControl, AccessLevelRequest)
19+
SWIFT_REQUEST(AccessControl, DefaultAndMaxAccessLevelRequest)
20+
SWIFT_REQUEST(AccessControl, SetterAccessLevelRequest)

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

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ class alignas(1 << DeclAlignInBits) Decl {
543543
NumRequirementsInSignature : 16
544544
);
545545

546-
SWIFT_INLINE_BITFIELD(ClassDecl, NominalTypeDecl, 2+1+2+1+7+1+1+1+1+1+1,
546+
SWIFT_INLINE_BITFIELD(ClassDecl, NominalTypeDecl, 2+1+2+1+7+1+1+1+1,
547547
/// The stage of the inheritance circularity check for this class.
548548
Circularity : 2,
549549

@@ -557,10 +557,7 @@ class alignas(1 << DeclAlignInBits) Decl {
557557
HasForcedEmittedMembers : 1,
558558

559559
HasMissingDesignatedInitializers : 1,
560-
ComputedHasMissingDesignatedInitializers : 1,
561-
562560
HasMissingVTableEntries : 1,
563-
ComputedHasMissingVTableEntries : 1,
564561

565562
/// Whether instances of this class are incompatible
566563
/// with weak and unowned references.
@@ -1428,7 +1425,7 @@ class GenericParamList final :
14281425
/// to the given DeclContext.
14291426
GenericParamList *clone(DeclContext *dc) const;
14301427

1431-
void print(raw_ostream &OS) const;
1428+
void print(raw_ostream &OS);
14321429
void dump();
14331430
};
14341431

@@ -3275,7 +3272,7 @@ class NominalTypeDecl : public GenericTypeDecl, public IterableDeclContext {
32753272
llvm::PointerIntPair<MemberLookupTable *, 1, bool> LookupTable;
32763273

32773274
/// Prepare the lookup table to make it ready for lookups.
3278-
void prepareLookupTable();
3275+
void prepareLookupTable(bool ignoreNewExtensions);
32793276

32803277
/// True if the entries in \c LookupTable are complete--that is, if a
32813278
/// name is present, it contains all members with that name.
@@ -3381,11 +3378,24 @@ class NominalTypeDecl : public GenericTypeDecl, public IterableDeclContext {
33813378
/// Retrieve the set of extensions of this type.
33823379
ExtensionRange getExtensions();
33833380

3381+
/// Make a member of this nominal type, or one of its extensions,
3382+
/// immediately visible in the lookup table.
3383+
///
3384+
/// A member of a nominal type or extension thereof will become
3385+
/// visible to name lookup as soon as it is added. However, if the
3386+
/// addition of a member is delayed---for example, because it's
3387+
/// being introduced in response to name lookup---this method can be
3388+
/// called to make it immediately visible.
3389+
void makeMemberVisible(ValueDecl *member);
3390+
33843391
/// Special-behaviour flags passed to lookupDirect()
33853392
enum class LookupDirectFlags {
3393+
/// Whether to avoid loading any new extension.
3394+
/// Used by the module loader to break recursion.
3395+
IgnoreNewExtensions = 1 << 0,
33863396
/// Whether to include @_implements members.
33873397
/// Used by conformance-checking to find special @_implements members.
3388-
IncludeAttrImplements = 1 << 0,
3398+
IncludeAttrImplements = 1 << 1,
33893399
};
33903400

33913401
/// Find all of the declarations with the given name within this nominal type
@@ -3869,7 +3879,6 @@ class ClassDecl final : public NominalTypeDecl {
38693879
bool hasMissingDesignatedInitializers() const;
38703880

38713881
void setHasMissingDesignatedInitializers(bool newValue = true) {
3872-
Bits.ClassDecl.ComputedHasMissingDesignatedInitializers = 1;
38733882
Bits.ClassDecl.HasMissingDesignatedInitializers = newValue;
38743883
}
38753884

@@ -3880,7 +3889,6 @@ class ClassDecl final : public NominalTypeDecl {
38803889
bool hasMissingVTableEntries() const;
38813890

38823891
void setHasMissingVTableEntries(bool newValue = true) {
3883-
Bits.ClassDecl.ComputedHasMissingVTableEntries = 1;
38843892
Bits.ClassDecl.HasMissingVTableEntries = newValue;
38853893
}
38863894

@@ -4187,14 +4195,6 @@ class ProtocolDecl final : public NominalTypeDecl {
41874195
/// a protocol having nested types (ObjC protocols).
41884196
llvm::TinyPtrVector<AssociatedTypeDecl *> getAssociatedTypeMembers() const;
41894197

4190-
/// Returns a protocol requirement with the given name, or nullptr if the
4191-
/// name has multiple overloads, or no overloads at all.
4192-
ValueDecl *getSingleRequirement(DeclName name) const;
4193-
4194-
/// Returns an associated type with the given name, or nullptr if one does
4195-
/// not exist.
4196-
AssociatedTypeDecl *getAssociatedType(Identifier name) const;
4197-
41984198
/// Walk this protocol and all of the protocols inherited by this protocol,
41994199
/// transitively, invoking the callback function for each protocol.
42004200
///
@@ -4338,7 +4338,7 @@ class ProtocolDecl final : public NominalTypeDecl {
43384338
/// with the Objective-C runtime.
43394339
StringRef getObjCRuntimeName(llvm::SmallVectorImpl<char> &buffer) const;
43404340

4341-
/// Create the generic parameters of this protocol if they haven't been
4341+
/// Create the generic parameters of this protocol if the haven't been
43424342
/// created yet.
43434343
void createGenericParamsIfMissing();
43444344

@@ -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,
@@ -7261,9 +7261,6 @@ inline void simple_display(llvm::raw_ostream &out,
72617261
simple_display(out, static_cast<const Decl *>(decl));
72627262
}
72637263

7264-
/// Display GenericParamList.
7265-
void simple_display(llvm::raw_ostream &out, const GenericParamList *GPL);
7266-
72677264
/// Extract the source location from the given declaration.
72687265
SourceLoc extractNearestSourceLoc(const Decl *decl);
72697266

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/GenericSignatureBuilder.h

Lines changed: 5 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 *>
@@ -615,6 +615,7 @@ class GenericSignatureBuilder {
615615
/// because the type \c Dictionary<K,V> cannot be formed without it.
616616
void inferRequirements(ModuleDecl &module,
617617
Type type,
618+
const TypeRepr *typeRepr,
618619
FloatingRequirementSource source);
619620

620621
/// Infer requirements from the given pattern, recursively.
@@ -1373,8 +1374,8 @@ class GenericSignatureBuilder::FloatingRequirementSource {
13731374
} kind;
13741375

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

13791380
Storage storage;
13801381

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@
2424
#include "llvm/ADT/SmallSet.h"
2525
#include "llvm/ADT/TinyPtrVector.h"
2626

27-
namespace llvm {
28-
class FileCollector;
29-
}
30-
3127
namespace clang {
3228
class DependencyCollector;
3329
}
@@ -58,9 +54,8 @@ enum class Bridgeability : unsigned {
5854
class DependencyTracker {
5955
std::shared_ptr<clang::DependencyCollector> clangCollector;
6056
public:
61-
explicit DependencyTracker(
62-
bool TrackSystemDeps,
63-
std::shared_ptr<llvm::FileCollector> FileCollector = {});
57+
58+
explicit DependencyTracker(bool TrackSystemDeps);
6459

6560
/// Adds a file as a dependency.
6661
///

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ template<typename Request>
265265
void reportEvaluatedRequest(UnifiedStatsReporter &stats,
266266
const Request &request);
267267

268-
#define SWIFT_REQUEST(Zone, RequestType, Sig, Caching) \
268+
#define SWIFT_REQUEST(Zone, RequestType) \
269269
template<> \
270270
inline void reportEvaluatedRequest(UnifiedStatsReporter &stats, \
271271
const RequestType &request) { \

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

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,12 @@
1515
//
1616
//===----------------------------------------------------------------------===//
1717

18-
SWIFT_REQUEST(NameLookup, CustomAttrNominalRequest,
19-
NominalTypeDecl *(CustomAttr *, DeclContext *), Cached)
20-
SWIFT_REQUEST(NameLookup, ExtendedNominalRequest,
21-
NominalTypeDecl *(ExtensionDecl *), SeparatelyCached)
22-
SWIFT_REQUEST(NameLookup, GetDestructorRequest, DestructorDecl *(ClassDecl *),
23-
SeparatelyCached)
24-
SWIFT_REQUEST(NameLookup, InheritedDeclsReferencedRequest,
25-
DirectlyReferencedTypeDecls(
26-
llvm::PointerUnion<TypeDecl *, ExtensionDecl *>, unsigned),
27-
Uncached)
28-
SWIFT_REQUEST(NameLookup, SelfBoundsFromWhereClauseRequest,
29-
SelfBounds(llvm::PointerUnion<TypeDecl *, ExtensionDecl *>),
30-
Uncached)
31-
SWIFT_REQUEST(NameLookup, SuperclassDeclRequest, ClassDecl *(NominalTypeDecl *),
32-
SeparatelyCached)
33-
SWIFT_REQUEST(NameLookup, TypeDeclsFromWhereClauseRequest,
34-
DirectlyReferencedTypeDecls(ExtensionDecl *), Uncached)
35-
SWIFT_REQUEST(NameLookup, UnderlyingTypeDeclsReferencedRequest,
36-
DirectlyReferencedTypeDecls(TypeAliasDecl *), Uncached)
18+
SWIFT_REQUEST(NameLookup, CustomAttrNominalRequest)
19+
SWIFT_REQUEST(NameLookup, ExtendedNominalRequest)
20+
SWIFT_REQUEST(NameLookup, GetDestructorRequest)
21+
SWIFT_REQUEST(NameLookup, InheritedDeclsReferencedRequest)
22+
SWIFT_REQUEST(NameLookup, SelfBoundsFromWhereClauseRequest)
23+
SWIFT_REQUEST(NameLookup, SuperclassDeclRequest)
24+
SWIFT_REQUEST(NameLookup, TypeDeclsFromWhereClauseRequest)
25+
SWIFT_REQUEST(NameLookup, UnderlyingTypeDeclsReferencedRequest)
26+

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class ParseAbstractFunctionBodyRequest :
7878
#undef SWIFT_TYPEID_HEADER
7979

8080
// Set up reporting of evaluated requests.
81-
#define SWIFT_REQUEST(Zone, RequestType, Sig, Caching) \
81+
#define SWIFT_REQUEST(Zone, RequestType) \
8282
template<> \
8383
inline void reportEvaluatedRequest(UnifiedStatsReporter &stats, \
8484
const RequestType &request) { \

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,5 @@
1414
//
1515
//===----------------------------------------------------------------------===//
1616

17-
SWIFT_REQUEST(Parse, ParseMembersRequest,
18-
ArrayRef<Decl *>(IterableDeclContext *), Cached)
19-
SWIFT_REQUEST(Parse, ParseAbstractFunctionBodyRequest,
20-
BraceStmt *(AbstractFunctionDecl *), SeparatelyCached)
17+
SWIFT_REQUEST(Parse, ParseMembersRequest)
18+
SWIFT_REQUEST(Parse, ParseAbstractFunctionBodyRequest)

0 commit comments

Comments
 (0)