mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Fix overly restrictive assertion, for -dump-scope-maps case
This commit is contained in:
@@ -1745,8 +1745,7 @@ StringRef SourceFile::getFilename() const {
|
||||
}
|
||||
|
||||
ASTScope &SourceFile::getScope() {
|
||||
assert(getASTContext().LangOpts.EnableASTScopeLookup &&
|
||||
isSuitableForASTScopes() && "Should not be creating scope tree");
|
||||
assert(isSuitableForASTScopes() && "Should not be creating scope tree");
|
||||
if (!Scope)
|
||||
Scope = std::unique_ptr<ASTScope>(new (getASTContext()) ASTScope(this));
|
||||
return *Scope.get();
|
||||
|
||||
Reference in New Issue
Block a user