Skip to content

Commit ad99acf

Browse files
committed
---
yaml --- r: 349307 b: refs/heads/master-next c: 5a8d074 h: refs/heads/master i: 349305: ca741e6 349303: deda837
1 parent 0bb19dc commit ad99acf

File tree

423 files changed

+3152
-3737
lines changed

Some content is hidden

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

423 files changed

+3152
-3737
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: b92c37e43497761f846a059be2496571d66b4cf8
3+
refs/heads/master-next: 5a8d0744c3284f934f5d8797e149ec24745ee42c
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/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/ASTContext.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ class ASTContext final {
857857
/// Register the given generic signature builder to be used as the canonical
858858
/// generic signature builder for the given signature, if we don't already
859859
/// have one.
860-
void registerGenericSignatureBuilder(GenericSignature *sig,
860+
void registerGenericSignatureBuilder(GenericSignature sig,
861861
GenericSignatureBuilder &&builder);
862862
friend class GenericSignatureBuilder;
863863

@@ -876,8 +876,8 @@ class ASTContext final {
876876
CanGenericSignature getExistentialSignature(CanType existential,
877877
ModuleDecl *mod);
878878

879-
GenericSignature *getOverrideGenericSignature(const ValueDecl *base,
880-
const ValueDecl *derived);
879+
GenericSignature getOverrideGenericSignature(const ValueDecl *base,
880+
const ValueDecl *derived);
881881

882882
enum class OverrideGenericSignatureReqCheck {
883883
/// Base method's generic requirements are satisifed by derived method

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -155,20 +155,20 @@ class ASTMangler : public Mangler {
155155
ModuleDecl *Module);
156156

157157
std::string mangleKeyPathGetterThunkHelper(const AbstractStorageDecl *property,
158-
GenericSignature *signature,
158+
GenericSignature signature,
159159
CanType baseType,
160160
SubstitutionMap subs,
161161
ResilienceExpansion expansion);
162162
std::string mangleKeyPathSetterThunkHelper(const AbstractStorageDecl *property,
163-
GenericSignature *signature,
163+
GenericSignature signature,
164164
CanType baseType,
165165
SubstitutionMap subs,
166166
ResilienceExpansion expansion);
167167
std::string mangleKeyPathEqualsHelper(ArrayRef<CanType> indices,
168-
GenericSignature *signature,
168+
GenericSignature signature,
169169
ResilienceExpansion expansion);
170170
std::string mangleKeyPathHashHelper(ArrayRef<CanType> indices,
171-
GenericSignature *signature,
171+
GenericSignature signature,
172172
ResilienceExpansion expansion);
173173

174174
std::string mangleTypeForDebugger(Type decl, const DeclContext *DC);
@@ -289,8 +289,8 @@ class ASTMangler : public Mangler {
289289
///
290290
/// \returns \c true if a generic signature was appended, \c false
291291
/// if it was empty.
292-
bool appendGenericSignature(const GenericSignature *sig,
293-
GenericSignature *contextSig = nullptr);
292+
bool appendGenericSignature(GenericSignature sig,
293+
GenericSignature contextSig = nullptr);
294294

295295
void appendRequirement(const Requirement &reqt);
296296

@@ -316,8 +316,8 @@ class ASTMangler : public Mangler {
316316
void appendBackingInitializerEntity(const VarDecl *var);
317317

318318
CanType getDeclTypeForMangling(const ValueDecl *decl,
319-
GenericSignature *&genericSig,
320-
GenericSignature *&parentGenericSig);
319+
GenericSignature &genericSig,
320+
GenericSignature &parentGenericSig);
321321

322322
void appendDeclType(const ValueDecl *decl, bool isFunctionMangling = false);
323323

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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
SWIFT_TYPEID(AncestryFlags)
1919
SWIFT_TYPEID(CtorInitializerKind)
20+
SWIFT_TYPEID(GenericSignature)
2021
SWIFT_TYPEID(PropertyWrapperBackingPropertyInfo)
2122
SWIFT_TYPEID(PropertyWrapperTypeInfo)
2223
SWIFT_TYPEID(Requirement)
@@ -26,7 +27,6 @@ SWIFT_TYPEID(TypePair)
2627
SWIFT_TYPEID_NAMED(CustomAttr *, CustomAttr)
2728
SWIFT_TYPEID_NAMED(Decl *, Decl)
2829
SWIFT_TYPEID_NAMED(GenericParamList *, GenericParamList)
29-
SWIFT_TYPEID_NAMED(GenericSignature *, GenericSignature)
3030
SWIFT_TYPEID_NAMED(GenericTypeParamType *, GenericTypeParamType)
3131
SWIFT_TYPEID_NAMED(InfixOperatorDecl *, InfixOperatorDecl)
3232
SWIFT_TYPEID_NAMED(IterableDeclContext *, IterableDeclContext)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ class AnyFunctionRef {
198198
llvm_unreachable("unexpected AnyFunctionRef representation");
199199
}
200200

201-
GenericSignature *getGenericSignature() const {
201+
GenericSignature getGenericSignature() const {
202202
if (auto afd = TheFunction.dyn_cast<AbstractFunctionDecl *>()) {
203203
return afd->getGenericSignature();
204204
}

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,27 +1279,27 @@ class SpecializeAttr : public DeclAttribute {
12791279

12801280
private:
12811281
TrailingWhereClause *trailingWhereClause;
1282-
GenericSignature *specializedSignature;
1282+
GenericSignature specializedSignature;
12831283

12841284
SpecializeAttr(SourceLoc atLoc, SourceRange Range,
12851285
TrailingWhereClause *clause, bool exported,
12861286
SpecializationKind kind,
1287-
GenericSignature *specializedSignature);
1287+
GenericSignature specializedSignature);
12881288

12891289
public:
12901290
static SpecializeAttr *create(ASTContext &Ctx, SourceLoc atLoc,
12911291
SourceRange Range, TrailingWhereClause *clause,
12921292
bool exported, SpecializationKind kind,
1293-
GenericSignature *specializedSignature
1293+
GenericSignature specializedSignature
12941294
= nullptr);
12951295

12961296
TrailingWhereClause *getTrailingWhereClause() const;
12971297

1298-
GenericSignature *getSpecializedSgnature() const {
1298+
GenericSignature getSpecializedSgnature() const {
12991299
return specializedSignature;
13001300
}
13011301

1302-
void setSpecializedSignature(GenericSignature *newSig) {
1302+
void setSpecializedSignature(GenericSignature newSig) {
13031303
specializedSignature = newSig;
13041304
}
13051305

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

Lines changed: 8 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1497,7 +1497,7 @@ class alignas(8) _GenericContext {
14971497
TrailingWhereClause *TrailingWhere = nullptr;
14981498

14991499
/// The generic signature of this declaration.
1500-
llvm::PointerIntPair<GenericSignature *, 1, bool> GenericSigAndBit;
1500+
llvm::PointerIntPair<GenericSignature, 1, bool> GenericSigAndBit;
15011501
};
15021502

15031503
class GenericContext : private _GenericContext, public DeclContext {
@@ -1541,7 +1541,7 @@ class GenericContext : private _GenericContext, public DeclContext {
15411541
}
15421542

15431543
/// Retrieve the generic signature for this context.
1544-
GenericSignature *getGenericSignature() const;
1544+
GenericSignature getGenericSignature() const;
15451545

15461546
/// Retrieve the generic context for this context.
15471547
GenericEnvironment *getGenericEnvironment() const;
@@ -1553,7 +1553,7 @@ class GenericContext : private _GenericContext, public DeclContext {
15531553
ArrayRef<Requirement> getGenericRequirements() const;
15541554

15551555
/// Set the generic signature of this context.
1556-
void setGenericSignature(GenericSignature *genericSig);
1556+
void setGenericSignature(GenericSignature genericSig);
15571557

15581558
/// Retrieve the position of any where clause for this context's
15591559
/// generic parameters.
@@ -1678,11 +1678,7 @@ class ExtensionDecl final : public GenericContext, public Decl,
16781678
TypeRepr *ExtendedTypeRepr;
16791679

16801680
/// The nominal type being extended.
1681-
///
1682-
/// The bit indicates whether binding has been attempted. The pointer can be
1683-
/// null if either no binding was attempted or if binding could not find the
1684-
/// extended nominal.
1685-
llvm::PointerIntPair<NominalTypeDecl *, 1, bool> ExtendedNominal;
1681+
NominalTypeDecl *ExtendedNominal = nullptr;
16861682

16871683
MutableArrayRef<TypeLoc> Inherited;
16881684

@@ -1742,12 +1738,6 @@ class ExtensionDecl final : public GenericContext, public Decl,
17421738
SourceRange getBraces() const { return Braces; }
17431739
void setBraces(SourceRange braces) { Braces = braces; }
17441740

1745-
bool hasBeenBound() const { return ExtendedNominal.getInt(); }
1746-
1747-
void setExtendedNominal(NominalTypeDecl *n) {
1748-
ExtendedNominal.setPointerAndInt(n, true);
1749-
}
1750-
17511741
/// Retrieve the type being extended.
17521742
///
17531743
/// Only use this entry point when the complete type, as spelled in the source,
@@ -1756,21 +1746,8 @@ class ExtensionDecl final : public GenericContext, public Decl,
17561746
Type getExtendedType() const;
17571747

17581748
/// Retrieve the nominal type declaration that is being extended.
1759-
/// Will trip an assertion if the declaration has not already been computed.
1760-
/// In order to fail fast when type checking work is attempted
1761-
/// before extension binding has taken place.
1762-
17631749
NominalTypeDecl *getExtendedNominal() const;
17641750

1765-
/// Compute the nominal type declaration that is being extended.
1766-
NominalTypeDecl *computeExtendedNominal() const;
1767-
1768-
/// \c hasBeenBound means nothing if this extension can never been bound
1769-
/// because it is not at the top level.
1770-
bool canNeverBeBound() const;
1771-
1772-
bool hasValidParent() const;
1773-
17741751
/// Determine whether this extension has already been bound to a nominal
17751752
/// type declaration.
17761753
bool alreadyBoundToNominal() const { return NextExtension.getInt(); }
@@ -2880,7 +2857,7 @@ class OpaqueTypeDecl : public GenericTypeDecl {
28802857
/// The generic signature of the opaque interface to the type. This is the
28812858
/// outer generic signature with an added generic parameter representing the
28822859
/// underlying type.
2883-
GenericSignature *OpaqueInterfaceGenericSignature;
2860+
GenericSignature OpaqueInterfaceGenericSignature;
28842861

28852862
/// The generic parameter that represents the underlying type.
28862863
GenericTypeParamType *UnderlyingInterfaceType;
@@ -2897,7 +2874,7 @@ class OpaqueTypeDecl : public GenericTypeDecl {
28972874
OpaqueTypeDecl(ValueDecl *NamingDecl,
28982875
GenericParamList *GenericParams,
28992876
DeclContext *DC,
2900-
GenericSignature *OpaqueInterfaceGenericSignature,
2877+
GenericSignature OpaqueInterfaceGenericSignature,
29012878
GenericTypeParamType *UnderlyingInterfaceType);
29022879

29032880
ValueDecl *getNamingDecl() const { return NamingDecl; }
@@ -2913,7 +2890,7 @@ class OpaqueTypeDecl : public GenericTypeDecl {
29132890
/// function could also be the getter of a storage declaration.
29142891
bool isOpaqueReturnTypeOfFunction(const AbstractFunctionDecl *func) const;
29152892

2916-
GenericSignature *getOpaqueInterfaceGenericSignature() const {
2893+
GenericSignature getOpaqueInterfaceGenericSignature() const {
29172894
return OpaqueInterfaceGenericSignature;
29182895
}
29192896

@@ -4810,7 +4787,7 @@ class VarDecl : public AbstractStorageDecl {
48104787
};
48114788

48124789
protected:
4813-
PointerUnion<PatternBindingDecl *, Stmt *, VarDecl *> Parent;
4790+
PointerUnion3<PatternBindingDecl *, Stmt *, VarDecl *> Parent;
48144791

48154792
VarDecl(DeclKind kind, bool isStatic, Introducer introducer,
48164793
bool issCaptureList, SourceLoc nameLoc, Identifier name,

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ class alignas(1 << DeclContextAlignInBits) DeclContext {
357357

358358
/// Retrieve the innermost generic signature of this context or any
359359
/// of its parents.
360-
GenericSignature *getGenericSignatureOfContext() const;
360+
GenericSignature getGenericSignatureOfContext() const;
361361

362362
/// Retrieve the innermost archetypes of this context or any
363363
/// of its parents.
@@ -470,10 +470,6 @@ class alignas(1 << DeclContextAlignInBits) DeclContext {
470470
/// AnyObject dynamic lookup.
471471
bool mayContainMembersAccessedByDynamicLookup() const;
472472

473-
/// Extensions are only allowed at the level in a file
474-
/// FIXME: do this for Protocols, too someday
475-
bool canBeParentOfExtension() const;
476-
477473
/// Returns true if lookups within this context could affect downstream files.
478474
///
479475
/// \param functionsAreNonCascading If true, functions are considered non-

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ class LoadedFile : public FileUnit {
337337
/// \returns \c true if this module file supports retrieving all of the
338338
/// generic signatures, \c false otherwise.
339339
virtual bool getAllGenericSignatures(
340-
SmallVectorImpl<GenericSignature*> &genericSignatures) {
340+
SmallVectorImpl<GenericSignature> &genericSignatures) {
341341
return false;
342342
}
343343

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class QueryInterfaceTypeSubstitutions {
5757
///
5858
class alignas(1 << DeclAlignInBits) GenericEnvironment final
5959
: private llvm::TrailingObjects<GenericEnvironment, Type> {
60-
GenericSignature *Signature = nullptr;
60+
GenericSignature Signature = GenericSignature();
6161
GenericSignatureBuilder *Builder = nullptr;
6262

6363
friend TrailingObjects;
@@ -74,7 +74,7 @@ class alignas(1 << DeclAlignInBits) GenericEnvironment final
7474
/// generic signature.
7575
ArrayRef<Type> getContextTypes() const;
7676

77-
GenericEnvironment(GenericSignature *signature,
77+
GenericEnvironment(GenericSignature signature,
7878
GenericSignatureBuilder *builder);
7979

8080
friend ArchetypeType;
@@ -85,7 +85,7 @@ class alignas(1 << DeclAlignInBits) GenericEnvironment final
8585
friend QueryInterfaceTypeSubstitutions;
8686

8787
public:
88-
GenericSignature *getGenericSignature() const {
88+
GenericSignature getGenericSignature() const {
8989
return Signature;
9090
}
9191

@@ -94,7 +94,7 @@ class alignas(1 << DeclAlignInBits) GenericEnvironment final
9494
/// Create a new, "incomplete" generic environment that will be populated
9595
/// by calls to \c addMapping().
9696
static
97-
GenericEnvironment *getIncomplete(GenericSignature *signature,
97+
GenericEnvironment *getIncomplete(GenericSignature signature,
9898
GenericSignatureBuilder *builder);
9999

100100
/// Add a mapping of a generic parameter to a specific type (which may be

0 commit comments

Comments
 (0)