More PCH -> AST renaming.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111472 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Frontend/ASTMerge.cpp b/lib/Frontend/ASTMerge.cpp
index cbaa6a3..b46212f 100644
--- a/lib/Frontend/ASTMerge.cpp
+++ b/lib/Frontend/ASTMerge.cpp
@@ -40,13 +40,13 @@
&CI.getASTContext());
llvm::IntrusiveRefCntPtr<Diagnostic> Diags(&CI.getDiagnostics());
for (unsigned I = 0, N = ASTFiles.size(); I != N; ++I) {
- ASTUnit *Unit = ASTUnit::LoadFromPCHFile(ASTFiles[I], Diags, false);
+ ASTUnit *Unit = ASTUnit::LoadFromASTFile(ASTFiles[I], Diags, false);
if (!Unit)
continue;
// Reset the argument -> string function so that it has the AST
// context we want, since the Sema object created by
- // LoadFromPCHFile will override it.
+ // LoadFromASTFile will override it.
CI.getDiagnostics().SetArgToStringFn(&FormatASTNodeDiagnosticArgument,
&CI.getASTContext());
diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp
index e0aa1b4..1749836 100644
--- a/lib/Frontend/ASTUnit.cpp
+++ b/lib/Frontend/ASTUnit.cpp
@@ -304,7 +304,7 @@
/// \brief Gathers information from ASTReader that will be used to initialize
/// a Preprocessor.
-class PCHInfoCollector : public ASTReaderListener {
+class ASTInfoCollector : public ASTReaderListener {
LangOptions &LangOpt;
HeaderSearch &HSI;
std::string &TargetTriple;
@@ -314,7 +314,7 @@
unsigned NumHeaderInfos;
public:
- PCHInfoCollector(LangOptions &LangOpt, HeaderSearch &HSI,
+ ASTInfoCollector(LangOptions &LangOpt, HeaderSearch &HSI,
std::string &TargetTriple, std::string &Predefines,
unsigned &Counter)
: LangOpt(LangOpt), HSI(HSI), TargetTriple(TargetTriple),
@@ -398,12 +398,12 @@
return OriginalSourceFile;
}
-const std::string &ASTUnit::getPCHFileName() {
- assert(isMainFileAST() && "Not an ASTUnit from a PCH file!");
+const std::string &ASTUnit::getASTFileName() {
+ assert(isMainFileAST() && "Not an ASTUnit from an AST file!");
return static_cast<ASTReader *>(Ctx->getExternalSource())->getFileName();
}
-ASTUnit *ASTUnit::LoadFromPCHFile(const std::string &Filename,
+ASTUnit *ASTUnit::LoadFromASTFile(const std::string &Filename,
llvm::IntrusiveRefCntPtr<Diagnostic> Diags,
bool OnlyLocalDecls,
RemappedFile *RemappedFiles,
@@ -460,7 +460,7 @@
Reader.reset(new ASTReader(AST->getSourceManager(), AST->getFileManager(),
AST->getDiagnostics()));
- Reader->setListener(new PCHInfoCollector(LangInfo, HeaderInfo, TargetTriple,
+ Reader->setListener(new ASTInfoCollector(LangInfo, HeaderInfo, TargetTriple,
Predefines, Counter));
switch (Reader->ReadAST(Filename)) {
@@ -475,11 +475,11 @@
AST->OriginalSourceFile = Reader->getOriginalSourceFile();
- // PCH loaded successfully. Now create the preprocessor.
+ // AST file loaded successfully. Now create the preprocessor.
// Get information about the target being compiled for.
//
- // FIXME: This is broken, we should store the TargetOptions in the PCH.
+ // FIXME: This is broken, we should store the TargetOptions in the AST file.
TargetOptions TargetOpts;
TargetOpts.ABI = "";
TargetOpts.CXXABI = "itanium";
@@ -512,7 +512,7 @@
// 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.
+ // AST file as needed.
ASTReader *ReaderPtr = Reader.get();
llvm::OwningPtr<ExternalASTSource> Source(Reader.take());
Context.setExternalSource(Source);
diff --git a/lib/Frontend/FrontendAction.cpp b/lib/Frontend/FrontendAction.cpp
index 906fd9a..531213b 100644
--- a/lib/Frontend/FrontendAction.cpp
+++ b/lib/Frontend/FrontendAction.cpp
@@ -51,7 +51,7 @@
llvm::IntrusiveRefCntPtr<Diagnostic> Diags(&CI.getDiagnostics());
std::string Error;
- ASTUnit *AST = ASTUnit::LoadFromPCHFile(Filename, Diags);
+ ASTUnit *AST = ASTUnit::LoadFromASTFile(Filename, Diags);
if (!AST)
goto failure;