Skip to content

Commit 5aeec19

Browse files
committed
---
yaml --- r: 349239 b: refs/heads/master-next c: f07f5b3 h: refs/heads/master i: 349237: 3293f23 349235: e03f50c 349231: 21fb095
1 parent 2a76794 commit 5aeec19

File tree

319 files changed

+2079
-2423
lines changed

Some content is hidden

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

319 files changed

+2079
-2423
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: 47c27e5880e105b0450c64feb6671218759a66ea
3+
refs/heads/master-next: f07f5b3de378eb453b1926ec472c010091dd5f8b
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/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/Decl.h

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,6 @@ class alignas(1 << DeclAlignInBits) Decl {
676676

677677
Decl(const Decl&) = delete;
678678
void operator=(const Decl&) = delete;
679-
SourceLoc getLocFromSource() const;
680679

681680
protected:
682681

@@ -1583,7 +1582,7 @@ enum class ImportKind : uint8_t {
15831582
class ImportDecl final : public Decl,
15841583
private llvm::TrailingObjects<ImportDecl, std::pair<Identifier,SourceLoc>> {
15851584
friend TrailingObjects;
1586-
friend class Decl;
1585+
15871586
public:
15881587
typedef std::pair<Identifier, SourceLoc> AccessPathElement;
15891588

@@ -1655,7 +1654,7 @@ class ImportDecl final : public Decl,
16551654
}
16561655

16571656
SourceLoc getStartLoc() const { return ImportLoc; }
1658-
SourceLoc getLocFromSource() const { return getFullAccessPath().front().second; }
1657+
SourceLoc getLoc() const { return getFullAccessPath().front().second; }
16591658
SourceRange getSourceRange() const {
16601659
return SourceRange(ImportLoc, getFullAccessPath().back().second);
16611660
}
@@ -1717,7 +1716,6 @@ class ExtensionDecl final : public GenericContext, public Decl,
17171716
std::pair<LazyMemberLoader *, uint64_t> takeConformanceLoaderSlow();
17181717

17191718
friend class ExtendedNominalRequest;
1720-
friend class Decl;
17211719
public:
17221720
using Decl::getASTContext;
17231721

@@ -1730,7 +1728,7 @@ class ExtensionDecl final : public GenericContext, public Decl,
17301728
ClangNode clangNode = ClangNode());
17311729

17321730
SourceLoc getStartLoc() const { return ExtensionLoc; }
1733-
SourceLoc getLocFromSource() const { return ExtensionLoc; }
1731+
SourceLoc getLoc() const { return ExtensionLoc; }
17341732
SourceRange getSourceRange() const {
17351733
return { ExtensionLoc, Braces.End };
17361734
}
@@ -2043,7 +2041,7 @@ class PatternBindingEntry {
20432041
class PatternBindingDecl final : public Decl,
20442042
private llvm::TrailingObjects<PatternBindingDecl, PatternBindingEntry> {
20452043
friend TrailingObjects;
2046-
friend class Decl;
2044+
20472045
SourceLoc StaticLoc; ///< Location of the 'static/class' keyword, if present.
20482046
SourceLoc VarLoc; ///< Location of the 'var' keyword.
20492047

@@ -2052,7 +2050,7 @@ class PatternBindingDecl final : public Decl,
20522050
PatternBindingDecl(SourceLoc StaticLoc, StaticSpellingKind StaticSpelling,
20532051
SourceLoc VarLoc, unsigned NumPatternEntries,
20542052
DeclContext *Parent);
2055-
SourceLoc getLocFromSource() const { return VarLoc; }
2053+
20562054
public:
20572055
static PatternBindingDecl *create(ASTContext &Ctx, SourceLoc StaticLoc,
20582056
StaticSpellingKind StaticSpelling,
@@ -2082,6 +2080,7 @@ class PatternBindingDecl final : public Decl,
20822080
SourceLoc getStartLoc() const {
20832081
return StaticLoc.isValid() ? StaticLoc : VarLoc;
20842082
}
2083+
SourceLoc getLoc() const { return VarLoc; }
20852084
SourceRange getSourceRange() const;
20862085

20872086
unsigned getNumPatternEntries() const {
@@ -2217,8 +2216,7 @@ class PatternBindingDecl final : public Decl,
22172216
/// global variables.
22182217
class TopLevelCodeDecl : public DeclContext, public Decl {
22192218
BraceStmt *Body;
2220-
SourceLoc getLocFromSource() const { return getStartLoc(); }
2221-
friend class Decl;
2219+
22222220
public:
22232221
TopLevelCodeDecl(DeclContext *Parent, BraceStmt *Body = nullptr)
22242222
: DeclContext(DeclContextKind::TopLevelCodeDecl, Parent),
@@ -2229,6 +2227,7 @@ class TopLevelCodeDecl : public DeclContext, public Decl {
22292227
void setBody(BraceStmt *b) { Body = b; }
22302228

22312229
SourceLoc getStartLoc() const;
2230+
SourceLoc getLoc() const { return getStartLoc(); }
22322231
SourceRange getSourceRange() const;
22332232

22342233
static bool classof(const Decl *D) {
@@ -2267,8 +2266,6 @@ class IfConfigDecl : public Decl {
22672266
/// The array is ASTContext allocated.
22682267
ArrayRef<IfConfigClause> Clauses;
22692268
SourceLoc EndLoc;
2270-
SourceLoc getLocFromSource() const { return Clauses[0].Loc; }
2271-
friend class Decl;
22722269
public:
22732270

22742271
IfConfigDecl(DeclContext *Parent, ArrayRef<IfConfigClause> Clauses,
@@ -2294,6 +2291,7 @@ class IfConfigDecl : public Decl {
22942291
}
22952292

22962293
SourceLoc getEndLoc() const { return EndLoc; }
2294+
SourceLoc getLoc() const { return Clauses[0].Loc; }
22972295

22982296
bool hadMissingEnd() const { return Bits.IfConfigDecl.HadMissingEnd; }
22992297

@@ -2310,8 +2308,7 @@ class PoundDiagnosticDecl : public Decl {
23102308
SourceLoc StartLoc;
23112309
SourceLoc EndLoc;
23122310
StringLiteralExpr *Message;
2313-
SourceLoc getLocFromSource() const { return StartLoc; }
2314-
friend class Decl;
2311+
23152312
public:
23162313
PoundDiagnosticDecl(DeclContext *Parent, bool IsError, SourceLoc StartLoc,
23172314
SourceLoc EndLoc, StringLiteralExpr *Message)
@@ -2340,6 +2337,7 @@ class PoundDiagnosticDecl : public Decl {
23402337
}
23412338

23422339
SourceLoc getEndLoc() const { return EndLoc; };
2340+
SourceLoc getLoc() const { return StartLoc; }
23432341

23442342
SourceRange getSourceRange() const {
23452343
return SourceRange(StartLoc, EndLoc);
@@ -2402,8 +2400,7 @@ class ValueDecl : public Decl {
24022400
friend class IsFinalRequest;
24032401
friend class IsDynamicRequest;
24042402
friend class IsImplicitlyUnwrappedOptionalRequest;
2405-
friend class Decl;
2406-
SourceLoc getLocFromSource() const { return NameLoc; }
2403+
24072404
protected:
24082405
ValueDecl(DeclKind K,
24092406
llvm::PointerUnion<DeclContext *, ASTContext *> context,
@@ -2476,6 +2473,7 @@ class ValueDecl : public Decl {
24762473
bool canInferObjCFromRequirement(ValueDecl *requirement);
24772474

24782475
SourceLoc getNameLoc() const { return NameLoc; }
2476+
SourceLoc getLoc() const { return NameLoc; }
24792477

24802478
bool isUsableFromInline() const;
24812479

@@ -4787,7 +4785,7 @@ class VarDecl : public AbstractStorageDecl {
47874785
};
47884786

47894787
protected:
4790-
PointerUnion<PatternBindingDecl *, Stmt *, VarDecl *> Parent;
4788+
PointerUnion3<PatternBindingDecl *, Stmt *, VarDecl *> Parent;
47914789

47924790
VarDecl(DeclKind kind, bool isStatic, Introducer introducer,
47934791
bool issCaptureList, SourceLoc nameLoc, Identifier name,
@@ -6283,7 +6281,6 @@ AbstractStorageDecl::AccessorRecord::getAccessor(AccessorKind kind) const {
62836281
class EnumCaseDecl final : public Decl,
62846282
private llvm::TrailingObjects<EnumCaseDecl, EnumElementDecl *> {
62856283
friend TrailingObjects;
6286-
friend class Decl;
62876284
SourceLoc CaseLoc;
62886285

62896286
EnumCaseDecl(SourceLoc CaseLoc,
@@ -6296,7 +6293,6 @@ class EnumCaseDecl final : public Decl,
62966293
std::uninitialized_copy(Elements.begin(), Elements.end(),
62976294
getTrailingObjects<EnumElementDecl *>());
62986295
}
6299-
SourceLoc getLocFromSource() const { return CaseLoc; }
63006296

63016297
public:
63026298
static EnumCaseDecl *create(SourceLoc CaseLoc,
@@ -6308,6 +6304,11 @@ class EnumCaseDecl final : public Decl,
63086304
return {getTrailingObjects<EnumElementDecl *>(),
63096305
Bits.EnumCaseDecl.NumElements};
63106306
}
6307+
6308+
SourceLoc getLoc() const {
6309+
return CaseLoc;
6310+
}
6311+
63116312
SourceRange getSourceRange() const;
63126313

63136314
static bool classof(const Decl *D) {
@@ -6720,8 +6721,7 @@ class PrecedenceGroupDecl : public Decl {
67206721
SourceLoc higherThanLoc, ArrayRef<Relation> higherThan,
67216722
SourceLoc lowerThanLoc, ArrayRef<Relation> lowerThan,
67226723
SourceLoc rbraceLoc);
6723-
friend class Decl;
6724-
SourceLoc getLocFromSource() const { return NameLoc; }
6724+
67256725
public:
67266726
static PrecedenceGroupDecl *create(DeclContext *dc,
67276727
SourceLoc precedenceGroupLoc,
@@ -6741,6 +6741,7 @@ class PrecedenceGroupDecl : public Decl {
67416741
SourceLoc rbraceLoc);
67426742

67436743

6744+
SourceLoc getLoc() const { return NameLoc; }
67446745
SourceRange getSourceRange() const {
67456746
return { PrecedenceGroupLoc, RBraceLoc };
67466747
}
@@ -6859,8 +6860,7 @@ class OperatorDecl : public Decl {
68596860
ArrayRef<Identifier> Identifiers;
68606861
ArrayRef<SourceLoc> IdentifierLocs;
68616862
ArrayRef<NominalTypeDecl *> DesignatedNominalTypes;
6862-
SourceLoc getLocFromSource() const { return NameLoc; }
6863-
friend class Decl;
6863+
68646864
public:
68656865
OperatorDecl(DeclKind kind, DeclContext *DC, SourceLoc OperatorLoc,
68666866
Identifier Name, SourceLoc NameLoc,
@@ -6875,6 +6875,7 @@ class OperatorDecl : public Decl {
68756875
: Decl(kind, DC), OperatorLoc(OperatorLoc), NameLoc(NameLoc), name(Name),
68766876
DesignatedNominalTypes(DesignatedNominalTypes) {}
68776877

6878+
SourceLoc getLoc() const { return NameLoc; }
68786879

68796880
SourceLoc getOperatorLoc() const { return OperatorLoc; }
68806881
SourceLoc getNameLoc() const { return NameLoc; }
@@ -7037,10 +7038,6 @@ class MissingMemberDecl : public Decl {
70377038
&& "not enough bits");
70387039
setImplicit();
70397040
}
7040-
friend class Decl;
7041-
SourceLoc getLocFromSource() const {
7042-
return SourceLoc();
7043-
}
70447041
public:
70457042
static MissingMemberDecl *
70467043
create(ASTContext &ctx, DeclContext *DC, DeclName name,
@@ -7065,6 +7062,10 @@ class MissingMemberDecl : public Decl {
70657062
return Bits.MissingMemberDecl.NumberOfFieldOffsetVectorEntries;
70667063
}
70677064

7065+
SourceLoc getLoc() const {
7066+
return SourceLoc();
7067+
}
7068+
70687069
SourceRange getSourceRange() const {
70697070
return SourceRange();
70707071
}

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/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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ struct WhereClauseOwner {
366366

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

371371
WhereClauseOwner(Decl *decl);
372372

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.

0 commit comments

Comments
 (0)