File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -942,7 +942,7 @@ class ASTContext final {
942
942
return !LangOpts.EnableAccessControl ;
943
943
}
944
944
945
- // / Logically, there is a separate cache for each SourceFile .
945
+ // / Each kind and SourceFile has its own cache for a Type .
946
946
Type &getDefaultTypeRequestCache (SourceFile *, KnownProtocolKind);
947
947
948
948
private:
Original file line number Diff line number Diff line change @@ -784,11 +784,10 @@ class IterableDeclContext {
784
784
template <typename ParamT, typename = typename std::enable_if<
785
785
std::is_same<ParamT, DeclContext>::value>::type>
786
786
void simple_display (llvm::raw_ostream &out, const ParamT *dc) {
787
- if (!dc) {
787
+ if (dc)
788
+ dc->printContext (out, 0 , true );
789
+ else
788
790
out << " (null)" ;
789
- return ;
790
- }
791
- dc->printContext (out, 0 , true );
792
791
}
793
792
794
793
} // end namespace swift
Original file line number Diff line number Diff line change @@ -292,7 +292,8 @@ FOR_KNOWN_FOUNDATION_TYPES(CACHE_FOUNDATION_DECL)
292
292
293
293
// / Caches of default types for DefaultTypeRequest.
294
294
// / Used to be instance variables in the TypeChecker.
295
- // / There is a logically separate cache for each SourceFile.
295
+ // / There is a logically separate cache for each SourceFile and
296
+ // / KnownProtocolKind.
296
297
llvm::DenseMap<SourceFile *, std::array<Type, NumKnownProtocols>>
297
298
DefaultTypeRequestCaches;
298
299
You can’t perform that action at this time.
0 commit comments