diff options
Diffstat (limited to 'clang/lib/Serialization/ASTWriterStmt.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTWriterStmt.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/lib/Serialization/ASTWriterStmt.cpp b/clang/lib/Serialization/ASTWriterStmt.cpp index fa5c3596853..77c9da13863 100644 --- a/clang/lib/Serialization/ASTWriterStmt.cpp +++ b/clang/lib/Serialization/ASTWriterStmt.cpp @@ -388,9 +388,13 @@ void ASTStmtWriter::VisitExpr(Expr *E) { void ASTStmtWriter::VisitPredefinedExpr(PredefinedExpr *E) { VisitExpr(E); + + bool HasFunctionName = E->getFunctionName() != nullptr; + Record.push_back(HasFunctionName); + Record.push_back(E->getIdentKind()); // FIXME: stable encoding Record.AddSourceLocation(E->getLocation()); - Record.push_back(E->getIdentType()); // FIXME: stable encoding - Record.AddStmt(E->getFunctionName()); + if (HasFunctionName) + Record.AddStmt(E->getFunctionName()); Code = serialization::EXPR_PREDEFINED; } |