Skip to content

Commit e3e15f2

Browse files
---
yaml --- r: 348829 b: refs/heads/master c: dbddb0d h: refs/heads/master i: 348827: 1e1da06
1 parent 8281587 commit e3e15f2

File tree

75 files changed

+590
-691
lines changed

Some content is hidden

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

75 files changed

+590
-691
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: e0ce37e0dabf3a2c821e744010046ba57f25dd8a
2+
refs/heads/master: dbddb0d89aa3dc94fdde427a93a0598b661bca0c
33
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea

trunk/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ set(SWIFT_ANALYZE_CODE_COVERAGE FALSE CACHE STRING
125125
# SWIFT_VERSION is deliberately /not/ cached so that an existing build directory
126126
# can be reused when a new version of Swift comes out (assuming the user hasn't
127127
# manually set it as part of their own CMake configuration).
128-
set(SWIFT_VERSION "5.1")
128+
set(SWIFT_VERSION "5.1.1")
129129

130130
set(SWIFT_VENDOR "" CACHE STRING
131131
"The vendor name of the Swift compiler")

trunk/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
| | **Architecture** | **Master** | **Package** |
77
|---|:---:|:---:|:---:|
88
| **macOS** | x86_64 |[![Build Status](https://ci.swift.org/job/oss-swift-incremental-RA-osx/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-incremental-RA-osx)|[![Build Status](https://ci.swift.org/job/oss-swift-package-osx/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-osx)|
9-
| **Ubuntu 14.04** | x86_64 | [![Build Status](https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-14_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-14_04)|[![Build Status](https://ci.swift.org/job/oss-swift-package-linux-ubuntu-14_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-linux-ubuntu-14_04)|
109
| **Ubuntu 16.04** | x86_64 | [![Build Status](https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-16_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-16_04)|[![Build Status](https://ci.swift.org/job/oss-swift-package-linux-ubuntu-16_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-linux-ubuntu-16_04)|
1110
| **Ubuntu 18.04** | x86_64 | [![Build Status](https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-18_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-18_04)|[![Build Status](https://ci.swift.org/job/oss-swift-package-linux-ubuntu-18_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-linux-ubuntu-18_04)|
1211

trunk/include/swift/ABI/Metadata.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -998,8 +998,6 @@ struct TargetClassMetadata : public TargetAnyClassMetadata<Runtime> {
998998
using StoredPointer = typename Runtime::StoredPointer;
999999
using StoredSize = typename Runtime::StoredSize;
10001000

1001-
friend class ReflectionContext;
1002-
10031001
TargetClassMetadata() = default;
10041002
constexpr TargetClassMetadata(const TargetAnyClassMetadata<Runtime> &base,
10051003
ClassFlags flags,

trunk/include/swift/AST/AnyRequest.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class AnyRequest {
5454
friend llvm::DenseMapInfo<swift::AnyRequest>;
5555

5656
static hash_code hashForHolder(uint64_t typeID, hash_code requestHash) {
57-
return hash_combine(hash_value(typeID), requestHash);
57+
return hash_combine(typeID, requestHash);
5858
}
5959

6060
/// Abstract base class used to hold the specific request kind.

trunk/include/swift/AST/Decl.h

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -340,12 +340,7 @@ class alignas(1 << DeclAlignInBits) Decl {
340340
IsUserAccessible : 1
341341
);
342342

343-
SWIFT_INLINE_BITFIELD(AbstractStorageDecl, ValueDecl, 1+1+1,
344-
/// Whether a keypath component can directly reference this storage,
345-
/// or if it must use the overridden declaration instead.
346-
HasComputedValidKeyPathComponent : 1,
347-
ValidKeyPathComponent : 1,
348-
343+
SWIFT_INLINE_BITFIELD(AbstractStorageDecl, ValueDecl, 1,
349344
/// Whether this property is a type property (currently unfortunately
350345
/// called 'static').
351346
IsStatic : 1
@@ -4535,8 +4530,6 @@ class AbstractStorageDecl : public ValueDecl {
45354530
Bits.AbstractStorageDecl.IsStatic = IsStatic;
45364531
}
45374532

4538-
void computeIsValidKeyPathComponent();
4539-
45404533
OpaqueTypeDecl *OpaqueReturn = nullptr;
45414534

45424535
public:
@@ -4779,18 +4772,9 @@ class AbstractStorageDecl : public ValueDecl {
47794772
/// property from the given module?
47804773
bool isResilient(ModuleDecl *M, ResilienceExpansion expansion) const;
47814774

4782-
void setIsValidKeyPathComponent(bool value) {
4783-
Bits.AbstractStorageDecl.HasComputedValidKeyPathComponent = true;
4784-
Bits.AbstractStorageDecl.ValidKeyPathComponent = value;
4785-
}
4786-
47874775
/// True if the storage can be referenced by a keypath directly.
47884776
/// Otherwise, its override must be referenced.
4789-
bool isValidKeyPathComponent() const {
4790-
if (!Bits.AbstractStorageDecl.HasComputedValidKeyPathComponent)
4791-
const_cast<AbstractStorageDecl *>(this)->computeIsValidKeyPathComponent();
4792-
return Bits.AbstractStorageDecl.ValidKeyPathComponent;
4793-
}
4777+
bool isValidKeyPathComponent() const;
47944778

47954779
/// True if the storage exports a property descriptor for key paths in
47964780
/// other modules.

trunk/include/swift/AST/SearchPathOptions.h

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

16+
#include "swift/Basic/ArrayRefView.h"
1617
#include "llvm/ADT/Hashing.h"
1718

1819
#include <string>
@@ -81,30 +82,38 @@ class SearchPathOptions {
8182
/// would for a non-system header.
8283
bool DisableModulesValidateSystemDependencies = false;
8384

85+
private:
86+
static StringRef
87+
pathStringFromFrameworkSearchPath(const FrameworkSearchPath &next) {
88+
return next.Path;
89+
};
90+
91+
public:
8492
/// Return a hash code of any components from these options that should
8593
/// contribute to a Swift Bridging PCH hash.
8694
llvm::hash_code getPCHHashComponents() const {
87-
using llvm::hash_value;
8895
using llvm::hash_combine;
89-
auto Code = hash_value(SDKPath);
90-
for (auto Import : ImportSearchPaths) {
91-
Code = hash_combine(Code, Import);
92-
}
93-
for (auto VFSFile : VFSOverlayFiles) {
94-
Code = hash_combine(Code, VFSFile);
95-
}
96-
for (const auto &FrameworkPath : FrameworkSearchPaths) {
97-
Code = hash_combine(Code, FrameworkPath.Path);
98-
}
99-
for (auto LibraryPath : LibrarySearchPaths) {
100-
Code = hash_combine(Code, LibraryPath);
101-
}
102-
Code = hash_combine(Code, RuntimeResourcePath);
103-
for (auto RuntimeLibraryImportPath : RuntimeLibraryImportPaths) {
104-
Code = hash_combine(Code, RuntimeLibraryImportPath);
105-
}
106-
Code = hash_combine(Code, DisableModulesValidateSystemDependencies);
107-
return Code;
96+
using llvm::hash_combine_range;
97+
98+
using FrameworkPathView = ArrayRefView<FrameworkSearchPath, StringRef,
99+
pathStringFromFrameworkSearchPath>;
100+
FrameworkPathView frameworkPathsOnly{FrameworkSearchPaths};
101+
102+
return hash_combine(SDKPath,
103+
hash_combine_range(ImportSearchPaths.begin(),
104+
ImportSearchPaths.end()),
105+
hash_combine_range(VFSOverlayFiles.begin(),
106+
VFSOverlayFiles.end()),
107+
// FIXME: Should we include the system-ness of framework
108+
// search paths too?
109+
hash_combine_range(frameworkPathsOnly.begin(),
110+
frameworkPathsOnly.end()),
111+
hash_combine_range(LibrarySearchPaths.begin(),
112+
LibrarySearchPaths.end()),
113+
RuntimeResourcePath,
114+
hash_combine_range(RuntimeLibraryImportPaths.begin(),
115+
RuntimeLibraryImportPaths.end()),
116+
DisableModulesValidateSystemDependencies);
108117
}
109118
};
110119

trunk/include/swift/AST/TypeCheckRequests.h

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,7 @@ struct WhereClauseOwner {
380380
SourceLoc getLoc() const;
381381

382382
friend hash_code hash_value(const WhereClauseOwner &owner) {
383-
return hash_combine(hash_value(owner.dc),
384-
hash_value(owner.source.getOpaqueValue()));
383+
return llvm::hash_combine(owner.dc, owner.source.getOpaqueValue());
385384
}
386385

387386
friend bool operator==(const WhereClauseOwner &lhs,
@@ -1209,6 +1208,7 @@ class UnderlyingTypeRequest :
12091208
bool isCached() const { return true; }
12101209
Optional<Type> getCachedResult() const;
12111210
void cacheResult(Type value) const;
1211+
void diagnoseCycle(DiagnosticEngine &diags) const;
12121212
};
12131213

12141214
class OperatorPrecedenceGroupRequest
@@ -1255,6 +1255,23 @@ class EnumRawValuesRequest :
12551255
void cacheResult(bool value) const;
12561256
};
12571257

1258+
class IsABICompatibleOverrideRequest
1259+
: public SimpleRequest<IsABICompatibleOverrideRequest, bool(ValueDecl *),
1260+
CacheKind::Cached> {
1261+
public:
1262+
using SimpleRequest::SimpleRequest;
1263+
1264+
private:
1265+
friend SimpleRequest;
1266+
1267+
// Evaluation.
1268+
llvm::Expected<bool> evaluate(Evaluator &evaluator, ValueDecl *decl) const;
1269+
1270+
public:
1271+
// Caching.
1272+
bool isCached() const { return true; }
1273+
};
1274+
12581275
// Allow AnyValue to compare two Type values, even though Type doesn't
12591276
// support ==.
12601277
template<>

trunk/include/swift/AST/TypeCheckerTypeIDZone.def

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,5 @@ SWIFT_REQUEST(TypeChecker, UnderlyingTypeRequest, Type(TypeAliasDecl *),
142142
SeparatelyCached, NoLocationInfo)
143143
SWIFT_REQUEST(TypeChecker, USRGenerationRequest, std::string(const ValueDecl *),
144144
Cached, NoLocationInfo)
145+
SWIFT_REQUEST(TypeChecker, IsABICompatibleOverrideRequest,
146+
bool(ValueDecl *), Cached, NoLocationInfo)

trunk/include/swift/AST/TypeLoc.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@ struct TypeLoc {
6868
TypeLoc clone(ASTContext &ctx) const;
6969

7070
friend llvm::hash_code hash_value(const TypeLoc &owner) {
71-
return hash_combine(llvm::hash_value(owner.Ty.getPointer()),
72-
llvm::hash_value(owner.TyR));
71+
return llvm::hash_combine(owner.Ty.getPointer(), owner.TyR);
7372
}
7473

7574
friend bool operator==(const TypeLoc &lhs,

trunk/include/swift/Basic/LangOptions.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -441,12 +441,10 @@ namespace swift {
441441
/// Return a hash code of any components from these options that should
442442
/// contribute to a Swift Bridging PCH hash.
443443
llvm::hash_code getPCHHashComponents() const {
444-
auto code = llvm::hash_value(Target.str());
445444
SmallString<16> Scratch;
446445
llvm::raw_svector_ostream OS(Scratch);
447446
OS << EffectiveLanguageVersion;
448-
code = llvm::hash_combine(code, OS.str());
449-
return code;
447+
return llvm::hash_combine(Target.str(), OS.str());
450448
}
451449

452450
private:

trunk/include/swift/Basic/SourceLoc.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,8 @@ template <> struct DenseMapInfo<swift::SourceRange> {
265265
}
266266

267267
static unsigned getHashValue(const swift::SourceRange &Val) {
268-
return hash_combine(DenseMapInfo<const void *>::getHashValue(
269-
Val.Start.getOpaquePointerValue()),
270-
DenseMapInfo<const void *>::getHashValue(
271-
Val.End.getOpaquePointerValue()));
268+
return hash_combine(Val.Start.getOpaquePointerValue(),
269+
Val.End.getOpaquePointerValue());
272270
}
273271

274272
static bool isEqual(const swift::SourceRange &LHS,

trunk/include/swift/ClangImporter/ClangImporterOptions.h

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -99,23 +99,21 @@ class ClangImporterOptions {
9999
/// Return a hash code of any components from these options that should
100100
/// contribute to a Swift Bridging PCH hash.
101101
llvm::hash_code getPCHHashComponents() const {
102-
using llvm::hash_value;
103102
using llvm::hash_combine;
104-
105-
auto Code = hash_value(ModuleCachePath);
106-
Code = hash_combine(Code, llvm::hash_combine_range(ExtraArgs.begin(),
107-
ExtraArgs.end()));
108-
Code = hash_combine(Code, OverrideResourceDir);
109-
Code = hash_combine(Code, TargetCPU);
110-
Code = hash_combine(Code, BridgingHeader);
111-
Code = hash_combine(Code, PrecompiledHeaderOutputDir);
112-
Code = hash_combine(Code, static_cast<uint8_t>(Mode));
113-
Code = hash_combine(Code, DetailedPreprocessingRecord);
114-
Code = hash_combine(Code, ImportForwardDeclarations);
115-
Code = hash_combine(Code, InferImportAsMember);
116-
Code = hash_combine(Code, DisableSwiftBridgeAttr);
117-
Code = hash_combine(Code, DisableOverlayModules);
118-
return Code;
103+
using llvm::hash_combine_range;
104+
105+
return hash_combine(ModuleCachePath,
106+
hash_combine_range(ExtraArgs.begin(), ExtraArgs.end()),
107+
OverrideResourceDir,
108+
TargetCPU,
109+
BridgingHeader,
110+
PrecompiledHeaderOutputDir,
111+
static_cast<uint8_t>(Mode),
112+
DetailedPreprocessingRecord,
113+
ImportForwardDeclarations,
114+
InferImportAsMember,
115+
DisableSwiftBridgeAttr,
116+
DisableOverlayModules);
119117
}
120118
};
121119

trunk/include/swift/IDE/IDERequests.h

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ struct CursorInfoOwner {
3838
CursorInfoOwner(SourceFile *File, SourceLoc Loc): File(File), Loc(Loc) { }
3939

4040
friend llvm::hash_code hash_value(const CursorInfoOwner &CI) {
41-
return hash_combine(hash_value(CI.File),
42-
hash_value(CI.Loc.getOpaquePointerValue()));
41+
return llvm::hash_combine(CI.File, CI.Loc.getOpaquePointerValue());
4342
}
4443

4544
friend bool operator==(const CursorInfoOwner &lhs, const CursorInfoOwner &rhs) {
@@ -97,9 +96,9 @@ struct RangeInfoOwner {
9796
RangeInfoOwner(SourceFile *File, unsigned Offset, unsigned Length);
9897

9998
friend llvm::hash_code hash_value(const RangeInfoOwner &CI) {
100-
return hash_combine(hash_value(CI.File),
101-
hash_value(CI.StartLoc.getOpaquePointerValue()),
102-
hash_value(CI.EndLoc.getOpaquePointerValue()));
99+
return llvm::hash_combine(CI.File,
100+
CI.StartLoc.getOpaquePointerValue(),
101+
CI.EndLoc.getOpaquePointerValue());
103102
}
104103

105104
friend bool operator==(const RangeInfoOwner &lhs, const RangeInfoOwner &rhs) {
@@ -183,9 +182,9 @@ struct OverridenDeclsOwner {
183182
Transitive(Transitive) {}
184183

185184
friend llvm::hash_code hash_value(const OverridenDeclsOwner &CI) {
186-
return hash_combine(hash_value(CI.VD),
187-
hash_value(CI.IncludeProtocolRequirements),
188-
hash_value(CI.Transitive));
185+
return llvm::hash_combine(CI.VD,
186+
CI.IncludeProtocolRequirements,
187+
CI.Transitive);
189188
}
190189

191190
friend bool operator==(const OverridenDeclsOwner &lhs,

trunk/include/swift/Parse/ASTGen.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,8 @@ class ASTGen {
6767

6868
private:
6969
DeclAttributes
70-
generateDeclAttributes(const syntax::DeclSyntax &D,
71-
const Optional<syntax::AttributeListSyntax> &attrs,
72-
const Optional<syntax::ModifierListSyntax> &modifiers,
73-
SourceLoc Loc, bool includeComments);
70+
generateDeclAttributes(const syntax::Syntax &D, SourceLoc Loc,
71+
bool includeComments);
7472

7573
void generateFreeStandingGenericWhereClause(
7674
const syntax::GenericWhereClauseSyntax &syntax,

trunk/include/swift/Sema/IDETypeCheckingRequests.h

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ struct DeclApplicabilityOwner {
3838
DC(DC), Ty(Ty), ExtensionOrMember(VD) {}
3939

4040
friend llvm::hash_code hash_value(const DeclApplicabilityOwner &CI) {
41-
return hash_combine(hash_value(CI.Ty.getPointer()),
42-
hash_value(CI.ExtensionOrMember));
41+
return llvm::hash_combine(CI.Ty.getPointer(), CI.ExtensionOrMember);
4342
}
4443

4544
friend bool operator==(const DeclApplicabilityOwner &lhs,
@@ -96,8 +95,8 @@ struct TypePair {
9695
TypePair(Type FirstTy, Type SecondTy): FirstTy(FirstTy), SecondTy(SecondTy) {}
9796
TypePair(): TypePair(Type(), Type()) {}
9897
friend llvm::hash_code hash_value(const TypePair &TI) {
99-
return hash_combine(hash_value(TI.FirstTy.getPointer()),
100-
hash_value(TI.SecondTy.getPointer()));
98+
return llvm::hash_combine(TI.FirstTy.getPointer(),
99+
TI.SecondTy.getPointer());
101100
}
102101

103102
friend bool operator==(const TypePair &lhs,
@@ -133,9 +132,7 @@ struct TypeRelationCheckInput {
133132
OpenArchetypes(OpenArchetypes) {}
134133

135134
friend llvm::hash_code hash_value(const TypeRelationCheckInput &TI) {
136-
return hash_combine(hash_value(TI.Pair),
137-
hash_value(TI.Relation),
138-
hash_value(TI.OpenArchetypes));
135+
return llvm::hash_combine(TI.Pair, TI.Relation, TI.OpenArchetypes);
139136
}
140137

141138
friend bool operator==(const TypeRelationCheckInput &lhs,

trunk/lib/AST/ASTContext.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3407,8 +3407,6 @@ ProtocolType::ProtocolType(ProtocolDecl *TheDecl, Type Parent,
34073407
: NominalType(TypeKind::Protocol, &Ctx, TheDecl, Parent, properties) { }
34083408

34093409
LValueType *LValueType::get(Type objectTy) {
3410-
assert(!objectTy->hasError() &&
3411-
"cannot have ErrorType wrapped inside LValueType");
34123410
assert(!objectTy->is<LValueType>() && !objectTy->is<InOutType>() &&
34133411
"cannot have 'inout' or @lvalue wrapped inside an @lvalue");
34143412

trunk/lib/AST/Builtins.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ getBuiltinFunction(Identifier Id, ArrayRef<Type> argTypes, Type ResType,
162162
ParamDecl(ParamDecl::Specifier::Default, SourceLoc(), SourceLoc(),
163163
Identifier(), SourceLoc(), Identifier(), DC);
164164
PD->setInterfaceType(argType);
165-
PD->setValidationToChecked();
166165
PD->setImplicit();
167166
params.push_back(PD);
168167
}
@@ -179,7 +178,6 @@ getBuiltinFunction(Identifier Id, ArrayRef<Type> argTypes, Type ResType,
179178
paramList,
180179
TypeLoc::withoutLoc(ResType), DC);
181180
FD->computeType(Info);
182-
FD->setValidationToChecked();
183181
FD->setImplicit();
184182
FD->setAccess(AccessLevel::Public);
185183
return FD;
@@ -209,7 +207,6 @@ getBuiltinGenericFunction(Identifier Id,
209207
Identifier(), SourceLoc(),
210208
Identifier(), DC);
211209
PD->setInterfaceType(paramIfaceType);
212-
PD->setValidationToChecked();
213210
PD->setImplicit();
214211
params.push_back(PD);
215212
}
@@ -228,7 +225,6 @@ getBuiltinGenericFunction(Identifier Id,
228225

229226
func->setGenericSignature(Sig);
230227
func->computeType();
231-
func->setValidationToChecked();
232228
func->setImplicit();
233229
func->setAccess(AccessLevel::Public);
234230

0 commit comments

Comments
 (0)