Skip to content

Commit 0233402

Browse files
committed
---
yaml --- r: 343517 b: refs/heads/master-rebranch c: 9612f44 h: refs/heads/master i: 343515: 11fb5dc
1 parent 15e07b3 commit 0233402

File tree

144 files changed

+1624
-1771
lines changed

Some content is hidden

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

144 files changed

+1624
-1771
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: eb52f0c448914c084027020fae92bd75ecdc7842
1458+
refs/heads/master-rebranch: 9612f447c1ad09783cf9dcc8ba325ae7858e8ecb
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/Decl.h

Lines changed: 18 additions & 18 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.
@@ -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,

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

Lines changed: 1 addition & 8 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

@@ -52,13 +51,11 @@ class ClangModuleUnit;
5251
class ClangNode;
5352
class Decl;
5453
class DeclContext;
55-
class EnumDecl;
5654
class ImportDecl;
5755
class IRGenOptions;
5856
class LazyResolver;
5957
class ModuleDecl;
6058
class NominalTypeDecl;
61-
class StructDecl;
6259
class TypeDecl;
6360
class VisibleDeclConsumer;
6461
enum class SelectorSplitKind;
@@ -150,8 +147,7 @@ class ClangImporter final : public ClangModuleLoader {
150147
/// Create a new clang::DependencyCollector customized to
151148
/// ClangImporter's specific uses.
152149
static std::shared_ptr<clang::DependencyCollector>
153-
createDependencyCollector(bool TrackSystemDeps,
154-
std::shared_ptr<llvm::FileCollector> FileCollector);
150+
createDependencyCollector(bool TrackSystemDeps);
155151

156152
/// Append visible module names to \p names. Note that names are possibly
157153
/// duplicated, and not guaranteed to be ordered in any way.
@@ -217,9 +213,6 @@ class ClangImporter final : public ClangModuleLoader {
217213
StringRef relatedEntityKind,
218214
llvm::function_ref<void(TypeDecl *)> receiver) override;
219215

220-
/// Look up the nested 'Code' enum for an error wrapper struct.
221-
EnumDecl *lookupErrorCodeEnum(const StructDecl *errorWrapper) const;
222-
223216
/// Look for textually included declarations from the bridging header.
224217
///
225218
/// \param filter returns true if the given clang decl/macro should be

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 {

branches/master-rebranch/include/swift/LLVMPasses/Passes.h

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,8 @@ namespace swift {
3030
const llvm::PreservedAnalyses &) { return false; }
3131

3232
using AAResultBase::getModRefInfo;
33-
llvm::ModRefInfo getModRefInfo(const llvm::CallBase *Call,
34-
const llvm::MemoryLocation &Loc) {
35-
llvm::AAQueryInfo AAQI;
36-
return getModRefInfo(Call, Loc, AAQI);
37-
}
38-
llvm::ModRefInfo getModRefInfo(const llvm::CallBase *Call,
39-
const llvm::MemoryLocation &Loc,
40-
llvm::AAQueryInfo &AAQI);
33+
llvm::ModRefInfo getModRefInfo(llvm::ImmutableCallSite CS,
34+
const llvm::MemoryLocation &Loc);
4135
};
4236

4337
class SwiftAAWrapperPass : public llvm::ImmutablePass {

branches/master-rebranch/include/swift/Parse/Parser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
#include "llvm/ADT/SetVector.h"
4141

4242
namespace llvm {
43-
template <typename... PTs> class PointerUnion;
43+
template <typename PT1, typename PT2, typename PT3> class PointerUnion3;
4444
}
4545

4646
namespace swift {

0 commit comments

Comments
 (0)