mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
ASTOOScope ontology
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
#include "swift/AST/ASTContext.h"
|
||||
#include "swift/AST/ASTMangler.h"
|
||||
#include "swift/AST/ASTPrinter.h"
|
||||
#include "swift/AST/ASTScope.h"
|
||||
#include "swift/AST/ASTWalker.h"
|
||||
#include "swift/AST/Builtins.h"
|
||||
#include "swift/AST/DiagnosticsSema.h"
|
||||
@@ -1696,11 +1695,12 @@ StringRef SourceFile::getFilename() const {
|
||||
return SM.getIdentifierForBuffer(BufferID);
|
||||
}
|
||||
|
||||
ASTScope &SourceFile::getScope() {
|
||||
if (!Scope) Scope = ASTScope::createRoot(this);
|
||||
return *Scope;
|
||||
ASTScope *SourceFile::getScope() {
|
||||
if (!Scope) Scope = ASTScope::createScopeTreeFor(this);
|
||||
return Scope;
|
||||
}
|
||||
|
||||
|
||||
Identifier
|
||||
SourceFile::getDiscriminatorForPrivateValue(const ValueDecl *D) const {
|
||||
assert(D->getDeclContext()->getModuleScopeContext() == this);
|
||||
|
||||
Reference in New Issue
Block a user