Skip to content

Commit 1800d5d

Browse files
committed
---
yaml --- r: 349161 b: refs/heads/master-next c: 0df6b40 h: refs/heads/master i: 349159: 11743b5
1 parent f064fdc commit 1800d5d

File tree

359 files changed

+2803
-3774
lines changed

Some content is hidden

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

359 files changed

+2803
-3774
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: 3574c513bbc5578dd9346b4ea9ab5995c5927bb5
3-
refs/heads/master-next: 37ab3895b94ad45ddde86b9ca7e0e15a44fe9f26
3+
refs/heads/master-next: 0df6b40710e185fa510e6e71586c7920fa7bce8b
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea
66
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-b: 66d897bfcf64a82cb9a87f5e663d889189d06d07

branches/master-next/CHANGELOG.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,6 @@ Swift Next
145145
Swift 5.1
146146
---------
147147

148-
### 2019-09-20 (Xcode 11.0)
149-
150148
* [SR-8974][]:
151149

152150
Duplicate tuple element labels are no longer allowed, because it leads

branches/master-next/cmake/modules/SwiftXcodeSupport.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ macro(swift_common_xcode_cxx_config)
100100
# Force usage of Clang.
101101
set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvm.clang.1_0"
102102
CACHE STRING "Xcode Compiler")
103-
# Use C++'14.
104-
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++14"
103+
# Use C++'11.
104+
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11"
105105
CACHE STRING "Xcode C++ Language Standard")
106106
# Use libc++.
107107
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++"

branches/master-next/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-next/include/swift/AST/ASTTypeIDZone.def

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,12 @@ SWIFT_TYPEID_NAMED(Decl *, Decl)
2828
SWIFT_TYPEID_NAMED(GenericParamList *, GenericParamList)
2929
SWIFT_TYPEID_NAMED(GenericSignature *, GenericSignature)
3030
SWIFT_TYPEID_NAMED(GenericTypeParamType *, GenericTypeParamType)
31-
SWIFT_TYPEID_NAMED(InfixOperatorDecl *, InfixOperatorDecl)
3231
SWIFT_TYPEID_NAMED(IterableDeclContext *, IterableDeclContext)
3332
SWIFT_TYPEID_NAMED(ModuleDecl *, ModuleDecl)
3433
SWIFT_TYPEID_NAMED(NominalTypeDecl *, NominalTypeDecl)
3534
SWIFT_TYPEID_NAMED(OperatorDecl *, OperatorDecl)
3635
SWIFT_TYPEID_NAMED(Optional<PropertyWrapperMutability>,
3736
PropertyWrapperMutability)
38-
SWIFT_TYPEID_NAMED(PrecedenceGroupDecl *, PrecedenceGroupDecl)
3937
SWIFT_TYPEID_NAMED(ProtocolDecl *, ProtocolDecl)
4038
SWIFT_TYPEID_NAMED(TypeAliasDecl *, TypeAliasDecl)
4139
SWIFT_TYPEID_NAMED(ValueDecl *, ValueDecl)

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,10 @@ class Decl;
2626
class GenericParamList;
2727
class GenericSignature;
2828
class GenericTypeParamType;
29-
class InfixOperatorDecl;
3029
class IterableDeclContext;
3130
class ModuleDecl;
3231
class NominalTypeDecl;
3332
class OperatorDecl;
34-
class PrecedenceGroupDecl;
3533
struct PropertyWrapperBackingPropertyInfo;
3634
struct PropertyWrapperTypeInfo;
3735
enum class CtorInitializerKind;

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

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4785,7 +4785,7 @@ class VarDecl : public AbstractStorageDecl {
47854785
};
47864786

47874787
protected:
4788-
PointerUnion<PatternBindingDecl *, Stmt *, VarDecl *> Parent;
4788+
PointerUnion3<PatternBindingDecl *, Stmt *, VarDecl *> Parent;
47894789

47904790
VarDecl(DeclKind kind, bool isStatic, Introducer introducer,
47914791
bool issCaptureList, SourceLoc nameLoc, Identifier name,
@@ -6329,9 +6329,7 @@ class EnumElementDecl : public DeclContext, public ValueDecl {
63296329

63306330
/// The raw value literal for the enum element, or null.
63316331
LiteralExpr *RawValueExpr;
6332-
/// The type-checked raw value expression.
6333-
Expr *TypeCheckedRawValueExpr = nullptr;
6334-
6332+
63356333
public:
63366334
EnumElementDecl(SourceLoc IdentifierLoc, DeclName Name,
63376335
ParameterList *Params,
@@ -6364,13 +6362,6 @@ class EnumElementDecl : public DeclContext, public ValueDecl {
63646362
bool hasRawValueExpr() const { return RawValueExpr; }
63656363
LiteralExpr *getRawValueExpr() const { return RawValueExpr; }
63666364
void setRawValueExpr(LiteralExpr *e) { RawValueExpr = e; }
6367-
6368-
Expr *getTypeCheckedRawValueExpr() const {
6369-
return TypeCheckedRawValueExpr;
6370-
}
6371-
void setTypeCheckedRawValueExpr(Expr *e) {
6372-
TypeCheckedRawValueExpr = e;
6373-
}
63746365

63756366
/// Return the containing EnumDecl.
63766367
EnumDecl *getParentEnum() const {
@@ -6909,6 +6900,7 @@ class OperatorDecl : public Decl {
69096900
/// \endcode
69106901
class InfixOperatorDecl : public OperatorDecl {
69116902
SourceLoc ColonLoc;
6903+
PrecedenceGroupDecl *PrecedenceGroup = nullptr;
69126904

69136905
public:
69146906
InfixOperatorDecl(DeclContext *DC, SourceLoc operatorLoc, Identifier name,
@@ -6919,6 +6911,14 @@ class InfixOperatorDecl : public OperatorDecl {
69196911
identifiers, identifierLocs),
69206912
ColonLoc(colonLoc) {}
69216913

6914+
InfixOperatorDecl(DeclContext *DC, SourceLoc operatorLoc, Identifier name,
6915+
SourceLoc nameLoc, SourceLoc colonLoc,
6916+
PrecedenceGroupDecl *precedenceGroup,
6917+
ArrayRef<NominalTypeDecl *> designatedNominalTypes)
6918+
: OperatorDecl(DeclKind::InfixOperator, DC, operatorLoc, name, nameLoc,
6919+
designatedNominalTypes),
6920+
ColonLoc(colonLoc), PrecedenceGroup(precedenceGroup) {}
6921+
69226922
SourceLoc getEndLoc() const {
69236923
auto identifierLocs = getIdentifierLocs();
69246924
if (identifierLocs.empty())
@@ -6933,7 +6933,10 @@ class InfixOperatorDecl : public OperatorDecl {
69336933

69346934
SourceLoc getColonLoc() const { return ColonLoc; }
69356935

6936-
PrecedenceGroupDecl *getPrecedenceGroup() const;
6936+
PrecedenceGroupDecl *getPrecedenceGroup() const { return PrecedenceGroup; }
6937+
void setPrecedenceGroup(PrecedenceGroupDecl *PGD) {
6938+
PrecedenceGroup = PGD;
6939+
}
69376940

69386941
/// True if this decl's attributes conflict with those declared by another
69396942
/// operator.

branches/master-next/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-next/include/swift/AST/Evaluator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ class Evaluator {
260260
// Check for a cycle.
261261
if (checkDependency(getCanonicalRequest(request))) {
262262
return llvm::Error(
263-
std::make_unique<CyclicalRequestError<Request>>(request, *this));
263+
llvm::make_unique<CyclicalRequestError<Request>>(request, *this));
264264
}
265265

266266
// Make sure we remove this from the set of active requests once we're

branches/master-next/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-next/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-next/include/swift/AST/NameLookupRequests.h

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#include "swift/AST/SimpleRequest.h"
2020
#include "swift/AST/ASTTypeIDs.h"
2121
#include "swift/Basic/Statistic.h"
22-
#include "llvm/ADT/Hashing.h"
2322
#include "llvm/ADT/TinyPtrVector.h"
2423

2524
namespace swift {
@@ -274,56 +273,6 @@ class GenericParamListRequest :
274273
void cacheResult(GenericParamList *value) const;
275274
};
276275

277-
struct PrecedenceGroupDescriptor {
278-
DeclContext *dc;
279-
Identifier ident;
280-
SourceLoc nameLoc;
281-
282-
SourceLoc getLoc() const;
283-
284-
friend llvm::hash_code hash_value(const PrecedenceGroupDescriptor &owner) {
285-
return hash_combine(llvm::hash_value(owner.dc),
286-
llvm::hash_value(owner.ident.getAsOpaquePointer()),
287-
llvm::hash_value(owner.nameLoc.getOpaquePointerValue()));
288-
}
289-
290-
friend bool operator==(const PrecedenceGroupDescriptor &lhs,
291-
const PrecedenceGroupDescriptor &rhs) {
292-
return lhs.dc == rhs.dc &&
293-
lhs.ident == rhs.ident &&
294-
lhs.nameLoc == rhs.nameLoc;
295-
}
296-
297-
friend bool operator!=(const PrecedenceGroupDescriptor &lhs,
298-
const PrecedenceGroupDescriptor &rhs) {
299-
return !(lhs == rhs);
300-
}
301-
};
302-
303-
void simple_display(llvm::raw_ostream &out, const PrecedenceGroupDescriptor &d);
304-
305-
class LookupPrecedenceGroupRequest
306-
: public SimpleRequest<LookupPrecedenceGroupRequest,
307-
PrecedenceGroupDecl *(PrecedenceGroupDescriptor),
308-
CacheKind::Cached> {
309-
public:
310-
using SimpleRequest::SimpleRequest;
311-
312-
private:
313-
friend SimpleRequest;
314-
315-
// Evaluation.
316-
llvm::Expected<PrecedenceGroupDecl *>
317-
evaluate(Evaluator &evaluator, PrecedenceGroupDescriptor descriptor) const;
318-
319-
public:
320-
// Source location
321-
SourceLoc getNearestLoc() const;
322-
323-
// Separate caching.
324-
bool isCached() const { return true; }
325-
};
326-
327276
#define SWIFT_TYPEID_ZONE NameLookup
328277
#define SWIFT_TYPEID_HEADER "swift/AST/NameLookupTypeIDZone.def"
329278
#include "swift/Basic/DefineTypeIDZone.h"

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ SWIFT_REQUEST(NameLookup, InheritedDeclsReferencedRequest,
3030
DirectlyReferencedTypeDecls(
3131
llvm::PointerUnion<TypeDecl *, ExtensionDecl *>, unsigned),
3232
Uncached, HasNearestLocation)
33-
SWIFT_REQUEST(NameLookup, LookupPrecedenceGroupRequest,
34-
PrecedenceGroupDecl *(DeclContext *, Identifier, SourceLoc),
35-
Cached, NoLocationInfo)
3633
SWIFT_REQUEST(NameLookup, SelfBoundsFromWhereClauseRequest,
3734
SelfBounds(llvm::PointerUnion<TypeDecl *, ExtensionDecl *>),
3835
Uncached, NoLocationInfo)

branches/master-next/include/swift/AST/SimpleRequest.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ class SimpleRequest<Derived, Output(Inputs...), Caching> {
195195

196196
template<size_t ...Indices>
197197
llvm::Expected<Output>
198-
callDerived(Evaluator &evaluator, std::index_sequence<Indices...>) const {
198+
callDerived(Evaluator &evaluator, llvm::index_sequence<Indices...>) const {
199199
static_assert(sizeof...(Indices) > 0, "Subclass must define evaluate()");
200200
return asDerived().evaluate(evaluator, std::get<Indices>(storage)...);
201201
}
@@ -217,7 +217,7 @@ class SimpleRequest<Derived, Output(Inputs...), Caching> {
217217
static llvm::Expected<OutputType>
218218
evaluateRequest(const Derived &request, Evaluator &evaluator) {
219219
return request.callDerived(evaluator,
220-
std::index_sequence_for<Inputs...>());
220+
llvm::index_sequence_for<Inputs...>());
221221
}
222222

223223
/// Retrieve the nearest source location to which this request applies.

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

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ class AbstractStorageDecl;
3333
class AccessorDecl;
3434
enum class AccessorKind;
3535
class GenericParamList;
36-
class PrecedenceGroupDecl;
3736
struct PropertyWrapperBackingPropertyInfo;
3837
struct PropertyWrapperMutability;
3938
class RequirementRepr;
@@ -366,7 +365,7 @@ struct WhereClauseOwner {
366365

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

371370
WhereClauseOwner(Decl *decl);
372371

@@ -1210,25 +1209,6 @@ class UnderlyingTypeRequest :
12101209
void cacheResult(Type value) const;
12111210
};
12121211

1213-
class OperatorPrecedenceGroupRequest
1214-
: public SimpleRequest<OperatorPrecedenceGroupRequest,
1215-
PrecedenceGroupDecl *(InfixOperatorDecl *),
1216-
CacheKind::Cached> {
1217-
public:
1218-
using SimpleRequest::SimpleRequest;
1219-
1220-
private:
1221-
friend SimpleRequest;
1222-
1223-
// Evaluation.
1224-
llvm::Expected<PrecedenceGroupDecl *>
1225-
evaluate(Evaluator &evaluator, InfixOperatorDecl *PGD) const;
1226-
1227-
public:
1228-
// Separate caching.
1229-
bool isCached() const { return true; }
1230-
};
1231-
12321212
// Allow AnyValue to compare two Type values, even though Type doesn't
12331213
// support ==.
12341214
template<>

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,6 @@ SWIFT_REQUEST(TypeChecker, MangleLocalTypeDeclRequest,
8585
SWIFT_REQUEST(TypeChecker, OpaqueReadOwnershipRequest,
8686
OpaqueReadOwnership(AbstractStorageDecl *), SeparatelyCached,
8787
NoLocationInfo)
88-
SWIFT_REQUEST(TypeChecker, OperatorPrecedenceGroupRequest,
89-
PrecedenceGroupDecl *(PrecedenceGroupDecl *),
90-
Cached, NoLocationInfo)
9188
SWIFT_REQUEST(TypeChecker, OverriddenDeclsRequest,
9289
llvm::TinyPtrVector<ValueDecl *>(ValueDecl *), SeparatelyCached,
9390
NoLocationInfo)

branches/master-next/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-next/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-next/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)