Implemented serialization of IndirectGotoStmt.
Added "FIXME" regarding the lack of source location information for IndirectGotoStmt.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43821 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/AST/StmtSerialization.cpp b/AST/StmtSerialization.cpp
index e4a43ac..e0b87c7 100644
--- a/AST/StmtSerialization.cpp
+++ b/AST/StmtSerialization.cpp
@@ -64,6 +64,9 @@
case IfStmtClass:
return IfStmt::directMaterialize(D);
+ case IndirectGotoStmtClass:
+ return IndirectGotoStmt::directMaterialize(D);
+
case IntegerLiteralClass:
return IntegerLiteral::directMaterialize(D);
@@ -256,6 +259,16 @@
return new IfStmt(L,Cond,Then,Else);
}
+void IndirectGotoStmt::directEmit(llvm::Serializer& S) const {
+ S.EmitPtr(Target);
+}
+
+IndirectGotoStmt* IndirectGotoStmt::directMaterialize(llvm::Deserializer& D) {
+ IndirectGotoStmt* stmt = new IndirectGotoStmt(NULL);
+ D.ReadPtr(stmt->Target); // The target may be backpatched.
+ return stmt;
+}
+
void IntegerLiteral::directEmit(llvm::Serializer& S) const {
S.Emit(Loc);
S.Emit(getType());