Use unique_ptr for Scope, getScope returns a reference

This commit is contained in:
David Ungar
2019-06-12 07:29:00 -07:00
parent 6cfcabd8e5
commit 69f6b41a13
7 changed files with 22 additions and 23 deletions

View File

@@ -992,7 +992,7 @@ private:
bool HasImplementationOnlyImports = false;
/// The scope map that describes this source file.
ASTScope *Scope = nullptr;
std::unique_ptr<ASTScope> Scope;
friend ASTContext;
friend Impl;
@@ -1192,7 +1192,7 @@ public:
StringRef getFilename() const;
/// Retrieve the scope that describes this source file.
ASTScope *getScope();
ASTScope &getScope();
void dump() const;
void dump(raw_ostream &os) const;