Skip to content

Commit

Permalink
Rename ASTReader::PerFileData to serialization::Module, pulling it out
Browse files Browse the repository at this point in the history
of ASTReader so it can become its own full-fledged class
(eventually). No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135767 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
DougGregor committed Jul 22, 2011
1 parent cb67f61 commit 72a9ae1
Show file tree
Hide file tree
Showing 8 changed files with 383 additions and 366 deletions.
575 changes: 295 additions & 280 deletions include/clang/Serialization/ASTReader.h

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lib/Frontend/ASTUnit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ ASTUnit *ASTUnit::LoadFromASTFile(const std::string &Filename,
Reader->setListener(new ASTInfoCollector(LangInfo, HeaderInfo, TargetTriple,
Predefines, Counter));

switch (Reader->ReadAST(Filename, ASTReader::MainFile)) {
switch (Reader->ReadAST(Filename, serialization::MK_MainFile)) {
case ASTReader::Success:
break;

Expand Down Expand Up @@ -2380,7 +2380,7 @@ void ASTUnit::TranslateStoredDiagnostics(
llvm::SmallVector<StoredDiagnostic, 4> Result;
Result.reserve(Diags.size());
assert(MMan && "Don't have a module manager");
ASTReader::PerFileData *Mod = MMan->Modules.lookup(ModName);
serialization::Module *Mod = MMan->Modules.lookup(ModName);
assert(Mod && "Don't have preamble module");
SLocRemap &Remap = Mod->SLocRemap;
for (unsigned I = 0, N = Diags.size(); I != N; ++I) {
Expand Down
5 changes: 3 additions & 2 deletions lib/Frontend/CompilerInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,9 @@ CompilerInstance::createPCHExternalASTSource(llvm::StringRef Path,

Reader->setDeserializationListener(
static_cast<ASTDeserializationListener *>(DeserializationListener));
switch (Reader->ReadAST(Path,
Preamble ? ASTReader::Preamble : ASTReader::PCH)) {
switch (Reader->ReadAST(Path,
Preamble ? serialization::MK_Preamble
: serialization::MK_PCH)) {
case ASTReader::Success:
// Set the predefines buffer as suggested by the PCH reader. Typically, the
// predefines buffer will be empty.
Expand Down
Loading

0 comments on commit 72a9ae1

Please sign in to comment.