[cfe-commits] r44077 - in /cfe/trunk: AST/StmtSerialization.cpp include/clang/AST/Stmt.h
Ted Kremenek
kremenek at apple.com
Tue Nov 13 14:55:52 PST 2007
Author: kremenek
Date: Tue Nov 13 16:55:51 2007
New Revision: 44077
URL: http://llvm.org/viewvc/llvm-project?rev=44077&view=rev
Log:
Implemented serialization of AsmStmt (or rather what is currently implemented
in AsmStmt).
Modified:
cfe/trunk/AST/StmtSerialization.cpp
cfe/trunk/include/clang/AST/Stmt.h
Modified: cfe/trunk/AST/StmtSerialization.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/AST/StmtSerialization.cpp?rev=44077&r1=44076&r2=44077&view=diff
==============================================================================
--- cfe/trunk/AST/StmtSerialization.cpp (original)
+++ cfe/trunk/AST/StmtSerialization.cpp Tue Nov 13 16:55:51 2007
@@ -41,6 +41,9 @@
case ArraySubscriptExprClass:
return ArraySubscriptExpr::CreateImpl(D);
+ case AsmStmtClass:
+ return AsmStmt::CreateImpl(D);
+
case BinaryOperatorClass:
return BinaryOperator::CreateImpl(D);
@@ -175,6 +178,18 @@
return new ArraySubscriptExpr(LHS,RHS,t,L);
}
+void AsmStmt::EmitImpl(Serializer& S) const {
+ S.Emit(AsmLoc);
+ S.Emit(RParenLoc);
+}
+
+AsmStmt* AsmStmt::CreateImpl(Deserializer& D) {
+ SourceLocation ALoc = SourceLocation::ReadVal(D);
+ SourceLocation PLoc = SourceLocation::ReadVal(D);
+
+ return new AsmStmt(ALoc,PLoc);
+}
+
void BinaryOperator::EmitImpl(Serializer& S) const {
S.EmitInt(Opc);
S.Emit(OpLoc);;
Modified: cfe/trunk/include/clang/AST/Stmt.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Stmt.h?rev=44077&r1=44076&r2=44077&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Stmt.h (original)
+++ cfe/trunk/include/clang/AST/Stmt.h Tue Nov 13 16:55:51 2007
@@ -718,6 +718,9 @@
virtual child_iterator child_begin();
virtual child_iterator child_end();
+
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static AsmStmt* CreateImpl(llvm::Deserializer& D);
};
/// ObjcAtCatchStmt - This represents objective-c's @catch statement.
More information about the cfe-commits
mailing list