Skip to content

Commit e45ea99

Browse files
committed
---
yaml --- r: 343991 b: refs/heads/master-rebranch c: 2f325fa h: refs/heads/master i: 343989: 01d5866 343987: 8135840 343983: fe6d72a
1 parent 1e099eb commit e45ea99

File tree

114 files changed

+1383
-1665
lines changed

Some content is hidden

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

114 files changed

+1383
-1665
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: f15ecf7f2fce30c0a37f8933ddfdfae78ad14be4
1458+
refs/heads/master-rebranch: 2f325fa1d8515b42ff02bc53962b9e0bd87ac143
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/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: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1505,13 +1505,12 @@ class alignas(8) _GenericContext {
15051505
TrailingWhereClause *TrailingWhere = nullptr;
15061506

15071507
/// The generic signature of this declaration.
1508-
llvm::PointerIntPair<GenericSignature *, 1, bool> GenericSigAndBit;
1508+
GenericSignature *GenericSig = nullptr;
15091509
};
15101510

15111511
class GenericContext : private _GenericContext, public DeclContext {
15121512
friend class GenericParamListRequest;
1513-
friend class GenericSignatureRequest;
1514-
1513+
15151514
protected:
15161515
GenericContext(DeclContextKind Kind, DeclContext *Parent,
15171516
GenericParamList *Params);
@@ -1535,8 +1534,7 @@ class GenericContext : private _GenericContext, public DeclContext {
15351534
/// }
15361535
/// \endcode
15371536
bool isGeneric() const { return getGenericParams() != nullptr; }
1538-
bool hasComputedGenericSignature() const;
1539-
1537+
15401538
/// Retrieve the trailing where clause for this extension, if any.
15411539
TrailingWhereClause *getTrailingWhereClause() const {
15421540
return TrailingWhere;
@@ -4790,7 +4788,7 @@ class VarDecl : public AbstractStorageDecl {
47904788
};
47914789

47924790
protected:
4793-
PointerUnion<PatternBindingDecl *, Stmt *, VarDecl *> Parent;
4791+
PointerUnion3<PatternBindingDecl *, Stmt *, VarDecl *> Parent;
47944792

47954793
VarDecl(DeclKind kind, bool isStatic, Introducer introducer,
47964794
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 *>
@@ -1373,8 +1373,8 @@ class GenericSignatureBuilder::FloatingRequirementSource {
13731373
} kind;
13741374

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

13791379
Storage storage;
13801380

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 & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ struct WhereClauseOwner {
365365

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

370370
WhereClauseOwner(Decl *decl);
371371

@@ -1160,27 +1160,6 @@ class FunctionOperatorRequest :
11601160
bool isCached() const { return true; }
11611161
};
11621162

1163-
class GenericSignatureRequest :
1164-
public SimpleRequest<GenericSignatureRequest,
1165-
GenericSignature *(GenericContext *),
1166-
CacheKind::SeparatelyCached> {
1167-
public:
1168-
using SimpleRequest::SimpleRequest;
1169-
1170-
private:
1171-
friend SimpleRequest;
1172-
1173-
// Evaluation.
1174-
llvm::Expected<GenericSignature *>
1175-
evaluate(Evaluator &evaluator, GenericContext *value) const;
1176-
1177-
public:
1178-
// Separate caching.
1179-
bool isCached() const { return true; }
1180-
Optional<GenericSignature *> getCachedResult() const;
1181-
void cacheResult(GenericSignature *value) const;
1182-
};
1183-
11841163
// Allow AnyValue to compare two Type values, even though Type doesn't
11851164
// support ==.
11861165
template<>

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@ SWIFT_REQUEST(TypeChecker, FunctionBuilderTypeRequest, Type(ValueDecl *),
4949
Cached, NoLocationInfo)
5050
SWIFT_REQUEST(TypeChecker, FunctionOperatorRequest, OperatorDecl *(FuncDecl *),
5151
Cached, NoLocationInfo)
52-
SWIFT_REQUEST(NameLookup, GenericSignatureRequest,
53-
GenericSignature *(GenericContext *),
54-
SeparatelyCached, NoLocationInfo)
5552
SWIFT_REQUEST(TypeChecker, InferredGenericSignatureRequest,
5653
GenericSignature *(ModuleDecl *, GenericSignature *,
5754
SmallVector<GenericParamList *, 2>,

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 & 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

@@ -150,8 +149,7 @@ class ClangImporter final : public ClangModuleLoader {
150149
/// Create a new clang::DependencyCollector customized to
151150
/// ClangImporter's specific uses.
152151
static std::shared_ptr<clang::DependencyCollector>
153-
createDependencyCollector(bool TrackSystemDeps,
154-
std::shared_ptr<llvm::FileCollector> FileCollector);
152+
createDependencyCollector(bool TrackSystemDeps);
155153

156154
/// Append visible module names to \p names. Note that names are possibly
157155
/// 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 {

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 {

branches/master-rebranch/include/swift/SIL/BranchPropagatedUser.h

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#ifndef SWIFT_SIL_BRANCHPROPAGATEDUSER_H
1414
#define SWIFT_SIL_BRANCHPROPAGATEDUSER_H
1515

16-
#include "swift/Basic/LLVM.h"
1716
#include "swift/SIL/SILBasicBlock.h"
1817
#include "swift/SIL/SILInstruction.h"
1918
#include "llvm/ADT/DenseMap.h"
@@ -28,68 +27,68 @@ namespace swift {
2827
/// BranchPropagatedUser and friends break all such critical edges.
2928
class BranchPropagatedUser {
3029
using InnerTy = llvm::PointerIntPair<SILInstruction *, 1>;
31-
InnerTy user;
30+
InnerTy User;
3231

3332
public:
34-
BranchPropagatedUser(SILInstruction *inst) : user(inst) {
35-
assert(!isa<CondBranchInst>(inst));
33+
BranchPropagatedUser(SILInstruction *I) : User(I) {
34+
assert(!isa<CondBranchInst>(I));
3635
}
3736

38-
BranchPropagatedUser(CondBranchInst *cbi) : user(cbi) {}
37+
BranchPropagatedUser(CondBranchInst *I) : User(I) {}
3938

40-
BranchPropagatedUser(CondBranchInst *cbi, unsigned successorIndex)
41-
: user(cbi, successorIndex) {
42-
assert(successorIndex == CondBranchInst::TrueIdx ||
43-
successorIndex == CondBranchInst::FalseIdx);
39+
BranchPropagatedUser(CondBranchInst *I, unsigned SuccessorIndex)
40+
: User(I, SuccessorIndex) {
41+
assert(SuccessorIndex == CondBranchInst::TrueIdx ||
42+
SuccessorIndex == CondBranchInst::FalseIdx);
4443
}
4544

46-
BranchPropagatedUser(const BranchPropagatedUser &other) : user(other.user) {}
47-
BranchPropagatedUser &operator=(const BranchPropagatedUser &other) {
48-
user = other.user;
45+
BranchPropagatedUser(const BranchPropagatedUser &Other) : User(Other.User) {}
46+
BranchPropagatedUser &operator=(const BranchPropagatedUser &Other) {
47+
User = Other.User;
4948
return *this;
5049
}
5150

52-
operator SILInstruction *() { return user.getPointer(); }
53-
operator const SILInstruction *() const { return user.getPointer(); }
51+
operator SILInstruction *() { return User.getPointer(); }
52+
operator const SILInstruction *() const { return User.getPointer(); }
5453

55-
SILInstruction *getInst() const { return user.getPointer(); }
54+
SILInstruction *getInst() const { return User.getPointer(); }
5655

5756
SILBasicBlock *getParent() const {
5857
if (!isCondBranchUser()) {
5958
return getInst()->getParent();
6059
}
6160

62-
auto *cbi = cast<CondBranchInst>(getInst());
63-
unsigned number = getCondBranchSuccessorID();
64-
if (number == CondBranchInst::TrueIdx)
65-
return cbi->getTrueBB();
66-
return cbi->getFalseBB();
61+
auto *CBI = cast<CondBranchInst>(getInst());
62+
unsigned Number = getCondBranchSuccessorID();
63+
if (Number == CondBranchInst::TrueIdx)
64+
return CBI->getTrueBB();
65+
return CBI->getFalseBB();
6766
}
6867

6968
bool isCondBranchUser() const {
70-
return isa<CondBranchInst>(user.getPointer());
69+
return isa<CondBranchInst>(User.getPointer());
7170
}
7271

7372
unsigned getCondBranchSuccessorID() const {
7473
assert(isCondBranchUser());
75-
return user.getInt();
74+
return User.getInt();
7675
}
7776

7877
SILBasicBlock::iterator getIterator() const {
79-
return user.getPointer()->getIterator();
78+
return User.getPointer()->getIterator();
8079
}
8180

8281
void *getAsOpaqueValue() const {
83-
return llvm::PointerLikeTypeTraits<InnerTy>::getAsVoidPointer(user);
82+
return llvm::PointerLikeTypeTraits<InnerTy>::getAsVoidPointer(User);
8483
}
8584

8685
static BranchPropagatedUser getFromOpaqueValue(void *p) {
87-
InnerTy tmpUser =
86+
InnerTy TmpUser =
8887
llvm::PointerLikeTypeTraits<InnerTy>::getFromVoidPointer(p);
89-
if (auto *cbi = dyn_cast<CondBranchInst>(tmpUser.getPointer())) {
90-
return BranchPropagatedUser(cbi, tmpUser.getInt());
88+
if (auto *CBI = dyn_cast<CondBranchInst>(TmpUser.getPointer())) {
89+
return BranchPropagatedUser(CBI, TmpUser.getInt());
9190
}
92-
return BranchPropagatedUser(tmpUser.getPointer());
91+
return BranchPropagatedUser(TmpUser.getPointer());
9392
}
9493

9594
enum {

0 commit comments

Comments
 (0)