Skip to content

Commit 09e64fa

Browse files
committed
---
yaml --- r: 343243 b: refs/heads/master-rebranch c: 1ca90ef h: refs/heads/master i: 343241: 02fcbd3 343239: 5bc004b
1 parent a313a17 commit 09e64fa

File tree

131 files changed

+906
-2221
lines changed

Some content is hidden

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

131 files changed

+906
-2221
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: a3dfad6a2b63f143baf539d583f40eaac1037b37
1458+
refs/heads/master-rebranch: 1ca90ef757f54c712ac76e0041e9af7d67ffbe33
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/include/swift/AST/ASTContext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ class ASTContext final {
826826
/// of the given decl context.
827827
///
828828
/// \param IDC The context whose member decls should be lazily parsed.
829-
std::vector<Decl *> parseMembers(IterableDeclContext *IDC);
829+
void parseMembers(IterableDeclContext *IDC);
830830

831831
/// Get the lazy function data for the given generic context.
832832
///

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
@@ -33,4 +33,3 @@ SWIFT_TYPEID(AncestryFlags)
3333
SWIFT_TYPEID_NAMED(GenericSignature *, GenericSignature)
3434
SWIFT_TYPEID_NAMED(GenericTypeParamType *, GenericTypeParamType)
3535
SWIFT_TYPEID(Requirement)
36-
SWIFT_TYPEID_NAMED(IterableDeclContext *, IterableDeclContext)

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,19 @@
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;

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

Lines changed: 1 addition & 17 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,
@@ -7248,17 +7248,6 @@ void simple_display(llvm::raw_ostream &out, const Decl *decl);
72487248
/// Display ValueDecl subclasses.
72497249
void simple_display(llvm::raw_ostream &out, const ValueDecl *decl);
72507250

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-
72627251
/// Extract the source location from the given declaration.
72637252
SourceLoc extractNearestSourceLoc(const Decl *decl);
72647253

@@ -7272,11 +7261,6 @@ inline SourceLoc extractNearestSourceLoc(const GenericTypeDecl *type) {
72727261
return extractNearestSourceLoc(static_cast<const Decl *>(type));
72737262
}
72747263

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-
72807264
/// Extract the source location from the given declaration.
72817265
inline SourceLoc extractNearestSourceLoc(const AbstractFunctionDecl *func) {
72827266
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/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

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,10 @@ class LazyMemberParser {
9090
public:
9191
virtual ~LazyMemberParser() = default;
9292

93-
/// Retrieves the parsed members for the given decl context \p IDC.
94-
virtual std::vector<Decl *> parseMembers(IterableDeclContext *IDC) = 0;
93+
/// Populates a given decl context \p IDC with all of its members.
94+
///
95+
/// The implementation should add the members to IDC.
96+
virtual void parseMembers(IterableDeclContext *IDC) = 0;
9597

9698
/// Return whether the iterable decl context needs parsing.
9799
virtual bool hasUnparsedMembers(const IterableDeclContext *IDC) = 0;

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

Lines changed: 0 additions & 70 deletions
This file was deleted.

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

Lines changed: 0 additions & 17 deletions
This file was deleted.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ struct WhereClauseOwner {
369369

370370
/// The source of the where clause, which can be a generic parameter list
371371
/// or a declaration that can have a where clause.
372-
llvm::PointerUnion<GenericParamList *, Decl *, SpecializeAttr *> source;
372+
llvm::PointerUnion3<GenericParamList *, Decl *, SpecializeAttr *> source;
373373

374374
WhereClauseOwner(Decl *decl);
375375

branches/master-rebranch/include/swift/Basic/LLVM.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ namespace llvm {
4242
template<typename T> class MutableArrayRef;
4343
template<typename T> class TinyPtrVector;
4444
template<typename T> class Optional;
45-
template <typename ...PTs> class PointerUnion;
45+
template <typename PT1, typename PT2> class PointerUnion;
46+
template <typename PT1, typename PT2, typename PT3> class PointerUnion3;
4647
class SmallBitVector;
4748

4849
// Other common classes.
@@ -67,6 +68,7 @@ namespace swift {
6768
using llvm::None;
6869
using llvm::Optional;
6970
using llvm::PointerUnion;
71+
using llvm::PointerUnion3;
7072
using llvm::SmallBitVector;
7173
using llvm::SmallPtrSet;
7274
using llvm::SmallPtrSetImpl;

branches/master-rebranch/include/swift/Basic/Statistics.def

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,6 @@ FRONTEND_STATISTIC(Parse, NumFunctionsParsed)
195195
/// Number of full braced decl list parsed.
196196
FRONTEND_STATISTIC(Parse, NumIterableDeclContextParsed)
197197

198-
#define SWIFT_REQUEST(ZONE, NAME) FRONTEND_STATISTIC(Parse, NAME)
199-
#include "swift/AST/ParseTypeIDZone.def"
200-
#undef SWIFT_REQUEST
201-
202198
/// Number of conformances that were deserialized by this frontend job.
203199
FRONTEND_STATISTIC(Sema, NumConformancesDeserialized)
204200

branches/master-rebranch/include/swift/Basic/TypeID.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ enum class Zone : uint8_t {
3535
IDE = 137,
3636
IDETypeChecking = 97,
3737
NameLookup = 9,
38-
Parse = 8,
3938
TypeChecker = 10,
4039
// N.B. This is not a formal zone and exists solely to support the unit tests.
4140
ArithmeticEvaluator = 255,

branches/master-rebranch/include/swift/ClangImporter/ClangImporter.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
namespace llvm {
2525
class Triple;
26-
class FileCollector;
2726
template<typename Fn> class function_ref;
2827
}
2928

@@ -148,8 +147,7 @@ class ClangImporter final : public ClangModuleLoader {
148147
/// Create a new clang::DependencyCollector customized to
149148
/// ClangImporter's specific uses.
150149
static std::shared_ptr<clang::DependencyCollector>
151-
createDependencyCollector(bool TrackSystemDeps,
152-
std::shared_ptr<llvm::FileCollector> FileCollector);
150+
createDependencyCollector(bool TrackSystemDeps);
153151

154152
/// Append visible module names to \p names. Note that names are possibly
155153
/// duplicated, and not guaranteed to be ordered in any way.

branches/master-rebranch/include/swift/ClangImporter/ClangImporterOptions.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ class ClangImporterOptions {
9696
/// When set, don't enforce warnings with -Werror.
9797
bool DebuggerSupport = false;
9898

99+
/// When set, clobber the Clang instance's virtual file system with the Swift
100+
/// virtual file system.
101+
bool ForceUseSwiftVirtualFileSystem = false;
102+
99103
/// Return a hash code of any components from these options that should
100104
/// contribute to a Swift Bridging PCH hash.
101105
llvm::hash_code getPCHHashComponents() const {

0 commit comments

Comments
 (0)