File tree Expand file tree Collapse file tree 5 files changed +11
-18
lines changed Expand file tree Collapse file tree 5 files changed +11
-18
lines changed Original file line number Diff line number Diff line change 30
30
31
31
#include " swift/AST/ASTNode.h"
32
32
#include " swift/AST/NameLookup.h" // for DeclVisibilityKind
33
- // extractNearestSourceLoc, simple_display declarations must come before this
34
- // Alternatively, declare these in SimpleDisplay.h or elsewhere
35
- // #include "swift/AST/SimpleRequest.h"
33
+ #include " swift/AST/SimpleRequest.h"
36
34
#include " swift/Basic/Compiler.h"
37
35
#include " swift/Basic/LLVM.h"
38
36
#include " swift/Basic/NullablePtr.h"
@@ -93,11 +91,13 @@ struct AnnotatedInsertionPoint {
93
91
};
94
92
} // namespace ast_scope
95
93
96
- SourceLoc extractNearestSourceLoc (
97
- std::tuple<ast_scope::ASTScopeImpl *, ast_scope::ScopeCreator *>);
98
-
99
94
namespace ast_scope {
100
95
96
+ void simple_display (llvm::raw_ostream &out, const ASTScopeImpl *);
97
+ void simple_display (llvm::raw_ostream &out, const ScopeCreator *);
98
+
99
+ SourceLoc extractNearestSourceLoc (std::tuple<ASTScopeImpl *, ScopeCreator *>);
100
+
101
101
#pragma mark the root ASTScopeImpl class
102
102
103
103
// / Describes a lexical scope within a source file.
Original file line number Diff line number Diff line change @@ -54,13 +54,6 @@ namespace swift {
54
54
55
55
#undef HAS_TRIVIAL_DISPLAY
56
56
57
- namespace ast_scope {
58
- class ASTScopeImpl ;
59
- class ScopeCreator ;
60
- } // namespace ast_scope
61
- void simple_display (llvm::raw_ostream &out, const ast_scope::ASTScopeImpl *);
62
- void simple_display (llvm::raw_ostream &out, const ast_scope::ScopeCreator *);
63
-
64
57
template <typename T>
65
58
typename std::enable_if<HasTrivialDisplay<T>::value>::type
66
59
simple_display (llvm::raw_ostream &out, const T &value) {
Original file line number Diff line number Diff line change @@ -2088,7 +2088,7 @@ bool ASTSourceFileScope::crossCheckWithAST() {
2088
2088
return scopeCreator->containsAllDeclContextsFromAST ();
2089
2089
}
2090
2090
2091
- void swift ::simple_display (llvm::raw_ostream &out,
2092
- const ast_scope:: ScopeCreator *scopeCreator) {
2091
+ void ast_scope ::simple_display (llvm::raw_ostream &out,
2092
+ const ScopeCreator *scopeCreator) {
2093
2093
scopeCreator->print (out);
2094
2094
}
Original file line number Diff line number Diff line change @@ -202,7 +202,7 @@ bool IterableTypeScope::doesDeclHaveABody() const {
202
202
return getBraces ().Start != getBraces ().End ;
203
203
}
204
204
205
- void swift ::simple_display (llvm::raw_ostream &out,
206
- const ast_scope:: ASTScopeImpl *scope) {
205
+ void ast_scope ::simple_display (llvm::raw_ostream &out,
206
+ const ASTScopeImpl *scope) {
207
207
scope->print (out);
208
208
}
Original file line number Diff line number Diff line change @@ -757,7 +757,7 @@ SourceLoc getLocAfterExtendedNominal(const ExtensionDecl *const ext) {
757
757
.getEnd ();
758
758
}
759
759
760
- SourceLoc swift ::extractNearestSourceLoc (
760
+ SourceLoc ast_scope ::extractNearestSourceLoc (
761
761
std::tuple<ASTScopeImpl *, ScopeCreator *> scopeAndCreator) {
762
762
const ASTScopeImpl *scope = std::get<0 >(scopeAndCreator);
763
763
return scope->getSourceRangeOfThisASTNode ().Start ;
You can’t perform that action at this time.
0 commit comments