diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-09-09 21:34:22 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-09-09 21:34:22 +0000 |
commit | 359427794704666ff7a5a933ace11c5256fa3af7 (patch) | |
tree | d78dcdb34cf9c11fd6f57033b5566ce269b8b017 /include/clang/Serialization | |
parent | 6274d30d77870393d83a404dd223b8005f2b8cd5 (diff) |
In ASTReader, replace the never-NULL ASTContext pointer with an
ASTContext reference. Remove all of the extra checking and logic that
was used to cope with a NULL ASTContext. No effective functionality
change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139413 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Serialization')
-rw-r--r-- | include/clang/Serialization/ASTReader.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/clang/Serialization/ASTReader.h b/include/clang/Serialization/ASTReader.h index e7019f311d..4d38a666f7 100644 --- a/include/clang/Serialization/ASTReader.h +++ b/include/clang/Serialization/ASTReader.h @@ -233,7 +233,7 @@ private: Preprocessor *PP; /// \brief The AST context into which we'll read the AST files. - ASTContext *Context; + ASTContext &Context; /// \brief The AST consumer. ASTConsumer *Consumer; @@ -752,8 +752,8 @@ public: /// \brief Set the Preprocessor to use. void setPreprocessor(Preprocessor &pp); - /// \brief Sets and initializes the given Context. - void InitializeContext(ASTContext &Context); + /// \brief Initializes the ASTContext + void InitializeContext(); /// \brief Add in-memory (virtual file) buffer. void addInMemoryBuffer(StringRef &FileName, llvm::MemoryBuffer *Buffer) { @@ -1267,7 +1267,7 @@ public: } /// \brief Retrieve the AST context that this AST reader supplements. - ASTContext *getContext() { return Context; } + ASTContext &getContext() { return Context; } // \brief Contains declarations that were loaded before we have // access to a Sema object. |