Skip to content

Commit 0e8dbc8

Browse files
authored
---
yaml --- r: 326207 b: refs/heads/master-next c: 1584e87 h: refs/heads/master i: 326205: a9648a6 326203: 3cc993d 326199: ce90873 326191: 9d6b18e 326175: 1ab78dc 326143: a994ee4
1 parent f73095e commit 0e8dbc8

File tree

344 files changed

+2391
-2994
lines changed

Some content is hidden

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

344 files changed

+2391
-2994
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: e052da7d8886fa0439677852e8f7830b20c2e1da
3-
refs/heads/master-next: da140a852a020d674b93f080280b819e2344395e
3+
refs/heads/master-next: 1584e87aa7dc92f1c4515da39367a63de1991e3a
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/SwiftHandleGybSources.cmake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,7 @@ function(handle_gyb_sources dependency_out_var_name sources_var_name arch)
121121
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/DeclNodes.py"
122122
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/ExprNodes.py"
123123
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/GenericNodes.py"
124-
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/NodeSerializationCodes.py"
125124
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/PatternNodes.py"
126-
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/SILOnlyNodes.py"
127125
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/StmtNodes.py"
128126
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/TypeNodes.py"
129127
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/Token.py"

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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4800,7 +4800,7 @@ class VarDecl : public AbstractStorageDecl {
48004800
};
48014801

48024802
protected:
4803-
PointerUnion<PatternBindingDecl *, Stmt *, VarDecl *> Parent;
4803+
PointerUnion3<PatternBindingDecl *, Stmt *, VarDecl *> Parent;
48044804

48054805
VarDecl(DeclKind kind, bool isStatic, Introducer introducer,
48064806
bool issCaptureList, SourceLoc nameLoc, Identifier name,

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

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 {

branches/master-next/include/swift/Frontend/Frontend.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ class CompilerInstance {
462462

463463
void createDependencyTracker(bool TrackSystemDeps) {
464464
assert(!Context && "must be called before setup()");
465-
DepTracker = std::make_unique<DependencyTracker>(TrackSystemDeps);
465+
DepTracker = llvm::make_unique<DependencyTracker>(TrackSystemDeps);
466466
}
467467
DependencyTracker *getDependencyTracker() { return DepTracker.get(); }
468468

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

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,21 @@
2222

2323
namespace swift {
2424
/// Generates AST nodes from Syntax nodes.
25-
class Parser;
2625
class ASTGen {
2726
ASTContext &Context;
2827

2928
/// Type cache to prevent multiple transformations of the same syntax node.
3029
llvm::DenseMap<syntax::SyntaxNodeId, TypeRepr *> TypeCache;
3130

32-
Parser &P;
31+
PersistentParserState **ParserState;
3332

3433
// FIXME: remove when Syntax can represent all types and ASTGen can handle them
3534
/// Types that cannot be represented by Syntax or generated by ASTGen.
3635
llvm::DenseMap<SourceLoc, TypeRepr *> Types;
3736

38-
llvm::DenseMap<SourceLoc, DeclAttributes> ParsedDeclAttrs;
39-
4037
public:
41-
ASTGen(ASTContext &Context, Parser &P)
42-
: Context(Context), P(P) {}
38+
ASTGen(ASTContext &Context, PersistentParserState **ParserState)
39+
: Context(Context), ParserState(ParserState) {}
4340

4441
SourceLoc generate(syntax::TokenSyntax Tok, SourceLoc &Loc);
4542

@@ -73,15 +70,6 @@ class ASTGen {
7370
llvm::SmallVector<TypeRepr *, 4>
7471
generate(syntax::GenericArgumentListSyntax Args, SourceLoc &Loc);
7572

76-
GenericParamList *
77-
generate(syntax::GenericParameterClauseListSyntax clause, SourceLoc &Loc);
78-
GenericParamList *
79-
generate(syntax::GenericParameterClauseSyntax clause, SourceLoc &Loc);
80-
Optional<RequirementRepr>
81-
generate(syntax::GenericRequirementSyntax req, SourceLoc &Loc);
82-
LayoutConstraint
83-
generate(syntax::LayoutConstraintSyntax req, SourceLoc &Loc);
84-
8573
/// Copy a numeric literal value into AST-owned memory, stripping underscores
8674
/// so the semantic part of the value can be parsed by APInt/APFloat parsers.
8775
static StringRef copyAndStripUnderscores(StringRef Orig, ASTContext &Context);
@@ -114,8 +102,6 @@ class ASTGen {
114102

115103
ValueDecl *lookupInScope(DeclName Name);
116104

117-
void addToScope(ValueDecl *D, bool diagnoseRedefinitions = true);
118-
119105
TypeRepr *cacheType(syntax::TypeSyntax Type, TypeRepr *TypeAST);
120106

121107
TypeRepr *lookupType(syntax::TypeSyntax Type);
@@ -126,10 +112,6 @@ class ASTGen {
126112
bool hasType(const SourceLoc &Loc) const;
127113

128114
TypeRepr *getType(const SourceLoc &Loc) const;
129-
130-
void addDeclAttributes(DeclAttributes attrs, SourceLoc Loc);
131-
bool hasDeclAttributes(SourceLoc Loc) const;
132-
DeclAttributes getDeclAttributes(SourceLoc Loc) const;
133115
};
134116
} // namespace swift
135117

branches/master-next/include/swift/Parse/Lexer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,8 @@ class Lexer {
200200
ParsedTrivia &TrailingTriviaResult) {
201201
Result = NextToken;
202202
if (TriviaRetention == TriviaRetentionMode::WithTrivia) {
203-
std::swap(LeadingTriviaResult, LeadingTrivia);
204-
std::swap(TrailingTriviaResult, TrailingTrivia);
203+
LeadingTriviaResult = {LeadingTrivia};
204+
TrailingTriviaResult = {TrailingTrivia};
205205
}
206206
if (Result.isNot(tok::eof))
207207
lexImpl();

branches/master-next/include/swift/Parse/ParsedSyntaxBuilders.h.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ namespace swift {
3030
class ParsedRawSyntaxRecorder;
3131
class SyntaxParsingContext;
3232

33-
% for node in SYNTAX_NODES + SILONLY_NODES:
33+
% for node in SYNTAX_NODES:
3434
% if node.is_buildable():
3535
% child_count = len(node.children)
3636
class Parsed${node.name}Builder {

branches/master-next/include/swift/Parse/ParsedSyntaxNodes.h.gyb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,20 @@ namespace swift {
2828
% # Emit the non-collection classes first, then emit the collection classes
2929
% # that reference these classes.
3030

31-
% for node in SYNTAX_NODES + SILONLY_NODES:
31+
% for node in SYNTAX_NODES:
3232
% if not node.is_syntax_collection():
3333
class Parsed${node.name};
3434
% end
3535
% end
3636

37-
% for node in SYNTAX_NODES + SILONLY_NODES:
37+
% for node in SYNTAX_NODES:
3838
% if node.is_syntax_collection():
3939
using Parsed${node.name} =
4040
ParsedSyntaxCollection<syntax::SyntaxKind::${node.syntax_kind}>;
4141
% end
4242
% end
4343

44-
% for node in SYNTAX_NODES + SILONLY_NODES:
44+
% for node in SYNTAX_NODES:
4545
% if not node.is_syntax_collection():
4646
% qualifier = "" if node.is_base() else "final"
4747
% for line in dedented_lines(node.description):

branches/master-next/include/swift/Parse/ParsedSyntaxRecorder.h.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class SyntaxParsingContext;
3131

3232
struct ParsedSyntaxRecorder {
3333

34-
% for node in SYNTAX_NODES + SILONLY_NODES:
34+
% for node in SYNTAX_NODES:
3535
% if node.children:
3636
% child_params = []
3737
% for child in node.children:

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

Lines changed: 3 additions & 23 deletions
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 {
@@ -695,19 +695,11 @@ class Parser {
695695
/// plain Tok.is(T1) check).
696696
bool skipUntilTokenOrEndOfLine(tok T1);
697697

698-
//-------------------------------------------------------------------------//
699-
// Ignore token APIs.
700-
// This is used when we skip gabage text in the source text.
701-
702-
/// Ignore the current single token.
703698
void ignoreToken();
704699
void ignoreToken(tok Kind) {
705-
/// Ignore the current single token asserting its kind.
706700
assert(Tok.is(Kind));
707701
ignoreToken();
708702
}
709-
/// Conditionally ignore the current single token if it matches with the \p
710-
/// Kind.
711703
bool ignoreIf(tok Kind) {
712704
if (!Tok.is(Kind))
713705
return false;
@@ -1181,8 +1173,7 @@ class Parser {
11811173
using TypeASTResult = ParserResult<TypeRepr>;
11821174
using TypeResult = ParsedSyntaxResult<ParsedTypeSyntax>;
11831175

1184-
ParsedSyntaxResult<ParsedLayoutConstraintSyntax>
1185-
parseLayoutConstraintSyntax();
1176+
LayoutConstraint parseLayoutConstraint(Identifier LayoutConstraintID);
11861177

11871178
TypeResult parseTypeSyntax();
11881179
TypeResult parseTypeSyntax(Diag<> MessageID, bool HandleCodeCompletion = true,
@@ -1606,19 +1597,8 @@ class Parser {
16061597
//===--------------------------------------------------------------------===//
16071598
// Generics Parsing
16081599

1609-
ParserResult<GenericParamList> parseSILGenericParams();
1610-
1611-
ParserStatus parseSILGenericParamsSyntax(
1612-
Optional<ParsedGenericParameterClauseListSyntax> &result);
1613-
1614-
ParsedSyntaxResult<ParsedGenericParameterClauseSyntax>
1615-
parseGenericParameterClauseSyntax();
1616-
1617-
ParsedSyntaxResult<ParsedGenericWhereClauseSyntax>
1618-
parseGenericWhereClauseSyntax(bool &FirstTypeInComplete,
1619-
bool AllowLayoutConstraints = false);
1620-
16211600
ParserResult<GenericParamList> parseGenericParameters();
1601+
ParserResult<GenericParamList> parseGenericParameters(SourceLoc LAngleLoc);
16221602
ParserStatus parseGenericParametersBeforeWhere(SourceLoc LAngleLoc,
16231603
SmallVectorImpl<GenericTypeParamDecl *> &GenericParams);
16241604
ParserResult<GenericParamList> maybeParseGenericParams();

0 commit comments

Comments
 (0)