aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Frontend')
-rw-r--r--lib/Frontend/ASTUnit.cpp20
-rw-r--r--lib/Frontend/CompilerInstance.cpp10
-rw-r--r--lib/Frontend/CompilerInvocation.cpp2
3 files changed, 16 insertions, 16 deletions
diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp
index 53a1035a76..7a2a5afe9a 100644
--- a/lib/Frontend/ASTUnit.cpp
+++ b/lib/Frontend/ASTUnit.cpp
@@ -302,7 +302,7 @@ void ASTUnit::ClearCachedCompletionResults() {
namespace {
-/// \brief Gathers information from PCHReader that will be used to initialize
+/// \brief Gathers information from ASTReader that will be used to initialize
/// a Preprocessor.
class PCHInfoCollector : public PCHReaderListener {
LangOptions &LangOpt;
@@ -400,7 +400,7 @@ const std::string &ASTUnit::getOriginalSourceFileName() {
const std::string &ASTUnit::getPCHFileName() {
assert(isMainFileAST() && "Not an ASTUnit from a PCH file!");
- return static_cast<PCHReader *>(Ctx->getExternalSource())->getFileName();
+ return static_cast<ASTReader *>(Ctx->getExternalSource())->getFileName();
}
ASTUnit *ASTUnit::LoadFromPCHFile(const std::string &Filename,
@@ -456,19 +456,19 @@ ASTUnit *ASTUnit::LoadFromPCHFile(const std::string &Filename,
std::string Predefines;
unsigned Counter;
- llvm::OwningPtr<PCHReader> Reader;
+ llvm::OwningPtr<ASTReader> Reader;
- Reader.reset(new PCHReader(AST->getSourceManager(), AST->getFileManager(),
+ Reader.reset(new ASTReader(AST->getSourceManager(), AST->getFileManager(),
AST->getDiagnostics()));
Reader->setListener(new PCHInfoCollector(LangInfo, HeaderInfo, TargetTriple,
Predefines, Counter));
switch (Reader->ReadPCH(Filename)) {
- case PCHReader::Success:
+ case ASTReader::Success:
break;
- case PCHReader::Failure:
- case PCHReader::IgnorePCH:
+ case ASTReader::Failure:
+ case ASTReader::IgnorePCH:
AST->getDiagnostics().Report(diag::err_fe_unable_to_load_pch);
return NULL;
}
@@ -510,17 +510,17 @@ ASTUnit *ASTUnit::LoadFromPCHFile(const std::string &Filename,
Reader->InitializeContext(Context);
- // Attach the PCH reader to the AST context as an external AST
+ // Attach the AST reader to the AST context as an external AST
// source, so that declarations will be deserialized from the
// PCH file as needed.
- PCHReader *ReaderPtr = Reader.get();
+ ASTReader *ReaderPtr = Reader.get();
llvm::OwningPtr<ExternalASTSource> Source(Reader.take());
Context.setExternalSource(Source);
// Create an AST consumer, even though it isn't used.
AST->Consumer.reset(new ASTConsumer);
- // Create a semantic analysis object and tell the PCH reader about it.
+ // Create a semantic analysis object and tell the AST reader about it.
AST->TheSema.reset(new Sema(PP, Context, *AST->Consumer));
AST->TheSema->Initialize();
ReaderPtr->InitializeSema(*AST->TheSema);
diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp
index 5db612542f..b930702ef4 100644
--- a/lib/Frontend/CompilerInstance.cpp
+++ b/lib/Frontend/CompilerInstance.cpp
@@ -264,25 +264,25 @@ CompilerInstance::createPCHExternalASTSource(llvm::StringRef Path,
Preprocessor &PP,
ASTContext &Context,
void *DeserializationListener) {
- llvm::OwningPtr<PCHReader> Reader;
- Reader.reset(new PCHReader(PP, &Context,
+ llvm::OwningPtr<ASTReader> Reader;
+ Reader.reset(new ASTReader(PP, &Context,
Sysroot.empty() ? 0 : Sysroot.c_str(),
DisablePCHValidation));
Reader->setDeserializationListener(
static_cast<PCHDeserializationListener *>(DeserializationListener));
switch (Reader->ReadPCH(Path)) {
- case PCHReader::Success:
+ case ASTReader::Success:
// Set the predefines buffer as suggested by the PCH reader. Typically, the
// predefines buffer will be empty.
PP.setPredefines(Reader->getSuggestedPredefines());
return Reader.take();
- case PCHReader::Failure:
+ case ASTReader::Failure:
// Unrecoverable failure: don't even try to process the input file.
break;
- case PCHReader::IgnorePCH:
+ case ASTReader::IgnorePCH:
// No suitable PCH file could be found. Return an error.
break;
}
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp
index 68b384f48c..f40fb644e3 100644
--- a/lib/Frontend/CompilerInvocation.cpp
+++ b/lib/Frontend/CompilerInvocation.cpp
@@ -1418,7 +1418,7 @@ static void ParsePreprocessorArgs(PreprocessorOptions &Opts, ArgList &Args,
// PCH is handled specially, we need to extra the original include path.
if (A->getOption().matches(OPT_include_pch)) {
std::string OriginalFile =
- PCHReader::getOriginalSourceFile(A->getValue(Args), Diags);
+ ASTReader::getOriginalSourceFile(A->getValue(Args), Diags);
if (OriginalFile.empty())
continue;