summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTReader.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-09-02 00:26:20 +0000
committerDouglas Gregor <dgregor@apple.com>2011-09-02 00:26:20 +0000
commit8835e03cee62306e877829592f9aae52361f9028 (patch)
tree4133beeb873f95bf83c4ba24f43ae5d268fa7aa4 /clang/lib/Serialization/ASTReader.cpp
parente8bbc121528b08157bf7457dada4bc87315a2c18 (diff)
downloadbcm5719-llvm-8835e03cee62306e877829592f9aae52361f9028.tar.gz
bcm5719-llvm-8835e03cee62306e877829592f9aae52361f9028.zip
Always construct an ASTReader with a non-NULL ASTContext and
Preprocessor, eliminating the constructor that was used by ASTUnit (which didn't provide an ASTContext or Prepreprocessor). Ensuring that both objects are non-NULL will simplify module loading (but none of that is done yet). llvm-svn: 138986
Diffstat (limited to 'clang/lib/Serialization/ASTReader.cpp')
-rw-r--r--clang/lib/Serialization/ASTReader.cpp24
1 files changed, 2 insertions, 22 deletions
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp
index 10b01d8c9f9..37a23faf0dc 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -5515,12 +5515,12 @@ void ASTReader::FinishedDeserializing() {
--NumCurrentElementsDeserializing;
}
-ASTReader::ASTReader(Preprocessor &PP, ASTContext *Context,
+ASTReader::ASTReader(Preprocessor &PP, ASTContext &Context,
StringRef isysroot, bool DisableValidation,
bool DisableStatCache)
: Listener(new PCHValidator(PP, *this)), DeserializationListener(0),
SourceMgr(PP.getSourceManager()), FileMgr(PP.getFileManager()),
- Diags(PP.getDiagnostics()), SemaObj(0), PP(&PP), Context(Context),
+ Diags(PP.getDiagnostics()), SemaObj(0), PP(&PP), Context(&Context),
Consumer(0), ModuleMgr(FileMgr.getFileSystemOptions()),
RelocatablePCH(false), isysroot(isysroot),
DisableValidation(DisableValidation),
@@ -5537,26 +5537,6 @@ ASTReader::ASTReader(Preprocessor &PP, ASTContext *Context,
SourceMgr.setExternalSLocEntrySource(this);
}
-ASTReader::ASTReader(SourceManager &SourceMgr, FileManager &FileMgr,
- Diagnostic &Diags, StringRef isysroot,
- bool DisableValidation, bool DisableStatCache)
- : DeserializationListener(0), SourceMgr(SourceMgr), FileMgr(FileMgr),
- Diags(Diags), SemaObj(0), PP(0), Context(0),
- Consumer(0), ModuleMgr(FileMgr.getFileSystemOptions()),
- RelocatablePCH(false), isysroot(isysroot),
- DisableValidation(DisableValidation), DisableStatCache(DisableStatCache),
- NumStatHits(0), NumStatMisses(0), NumSLocEntriesRead(0),
- TotalNumSLocEntries(0), NumStatementsRead(0),
- TotalNumStatements(0), NumMacrosRead(0), TotalNumMacros(0),
- NumSelectorsRead(0), NumMethodPoolEntriesRead(0), NumMethodPoolMisses(0),
- TotalNumMethodPoolEntries(0), NumLexicalDeclContextsRead(0),
- TotalLexicalDeclContexts(0), NumVisibleDeclContextsRead(0),
- TotalVisibleDeclContexts(0), TotalModulesSizeInBits(0),
- NumCurrentElementsDeserializing(0), NumCXXBaseSpecifiersLoaded(0)
-{
- SourceMgr.setExternalSLocEntrySource(this);
-}
-
ASTReader::~ASTReader() {
for (DeclContextVisibleUpdatesPending::iterator
I = PendingVisibleUpdates.begin(),
OpenPOWER on IntegriCloud