diff options
author | Sebastian Redl <sebastian.redl@getdesigned.at> | 2010-08-18 23:56:21 +0000 |
---|---|---|
committer | Sebastian Redl <sebastian.redl@getdesigned.at> | 2010-08-18 23:56:21 +0000 |
commit | a4232eb646d89e7d52424bb42eb87d9061f39e63 (patch) | |
tree | e70f12104a106fe51edfcb534f17d98adfd3c10e /lib/Serialization/PCHWriterStmt.cpp | |
parent | f421089b73800066bbf43613c9a8422a96c1b0c3 (diff) |
Rename PCHWriter to ASTWriter
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111463 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/PCHWriterStmt.cpp')
-rw-r--r-- | lib/Serialization/PCHWriterStmt.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/Serialization/PCHWriterStmt.cpp b/lib/Serialization/PCHWriterStmt.cpp index 182a272603..dfc3c20bc1 100644 --- a/lib/Serialization/PCHWriterStmt.cpp +++ b/lib/Serialization/PCHWriterStmt.cpp @@ -24,13 +24,13 @@ using namespace clang; namespace clang { class PCHStmtWriter : public StmtVisitor<PCHStmtWriter, void> { - PCHWriter &Writer; - PCHWriter::RecordData &Record; + ASTWriter &Writer; + ASTWriter::RecordData &Record; public: pch::StmtCode Code; - PCHStmtWriter(PCHWriter &Writer, PCHWriter::RecordData &Record) + PCHStmtWriter(ASTWriter &Writer, ASTWriter::RecordData &Record) : Writer(Writer), Record(Record) { } void @@ -1279,10 +1279,10 @@ void PCHStmtWriter::VisitUnaryTypeTraitExpr(UnaryTypeTraitExpr *E) { } //===----------------------------------------------------------------------===// -// PCHWriter Implementation +// ASTWriter Implementation //===----------------------------------------------------------------------===// -unsigned PCHWriter::RecordSwitchCaseID(SwitchCase *S) { +unsigned ASTWriter::RecordSwitchCaseID(SwitchCase *S) { assert(SwitchCaseIDs.find(S) == SwitchCaseIDs.end() && "SwitchCase recorded twice"); unsigned NextID = SwitchCaseIDs.size(); @@ -1290,7 +1290,7 @@ unsigned PCHWriter::RecordSwitchCaseID(SwitchCase *S) { return NextID; } -unsigned PCHWriter::getSwitchCaseID(SwitchCase *S) { +unsigned ASTWriter::getSwitchCaseID(SwitchCase *S) { assert(SwitchCaseIDs.find(S) != SwitchCaseIDs.end() && "SwitchCase hasn't been seen yet"); return SwitchCaseIDs[S]; @@ -1298,7 +1298,7 @@ unsigned PCHWriter::getSwitchCaseID(SwitchCase *S) { /// \brief Retrieve the ID for the given label statement, which may /// or may not have been emitted yet. -unsigned PCHWriter::GetLabelID(LabelStmt *S) { +unsigned ASTWriter::GetLabelID(LabelStmt *S) { std::map<LabelStmt *, unsigned>::iterator Pos = LabelIDs.find(S); if (Pos != LabelIDs.end()) return Pos->second; @@ -1310,7 +1310,7 @@ unsigned PCHWriter::GetLabelID(LabelStmt *S) { /// \brief Write the given substatement or subexpression to the /// bitstream. -void PCHWriter::WriteSubStmt(Stmt *S) { +void ASTWriter::WriteSubStmt(Stmt *S) { RecordData Record; PCHStmtWriter Writer(*this, Record); ++NumStatements; @@ -1320,7 +1320,7 @@ void PCHWriter::WriteSubStmt(Stmt *S) { return; } - // Redirect PCHWriter::AddStmt to collect sub stmts. + // Redirect ASTWriter::AddStmt to collect sub stmts. llvm::SmallVector<Stmt *, 16> SubStmts; CollectedStmts = &SubStmts; @@ -1336,7 +1336,7 @@ void PCHWriter::WriteSubStmt(Stmt *S) { } #endif - // Revert PCHWriter::AddStmt. + // Revert ASTWriter::AddStmt. CollectedStmts = &StmtsToEmit; // Write the sub stmts in reverse order, last to first. When reading them back @@ -1351,7 +1351,7 @@ void PCHWriter::WriteSubStmt(Stmt *S) { /// \brief Flush all of the statements that have been added to the /// queue via AddStmt(). -void PCHWriter::FlushStmts() { +void ASTWriter::FlushStmts() { RecordData Record; for (unsigned I = 0, N = StmtsToEmit.size(); I != N; ++I) { |