diff options
author | Sebastian Redl <sebastian.redl@getdesigned.at> | 2012-02-16 11:35:52 +0000 |
---|---|---|
committer | Sebastian Redl <sebastian.redl@getdesigned.at> | 2012-02-16 11:35:52 +0000 |
commit | 1548d14f4092a817f7d90ad3e7a65266dc85fbc5 (patch) | |
tree | 9598a6e0e3d1961c32a7ab570360ada0a543eb6c /lib/Serialization/ASTWriterStmt.cpp | |
parent | 5f688f4b15d02aa7ad159c46b1f78fe59d412f12 (diff) |
Revert "Make CXXNewExpr contain only a single initialier, and not hold the used constructor itself."
It leads to a compiler crash in the Bullet benchmark.
This reverts commit r12014.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150684 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTWriterStmt.cpp')
-rw-r--r-- | lib/Serialization/ASTWriterStmt.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/Serialization/ASTWriterStmt.cpp b/lib/Serialization/ASTWriterStmt.cpp index 0ba413df72..f6cfd01341 100644 --- a/lib/Serialization/ASTWriterStmt.cpp +++ b/lib/Serialization/ASTWriterStmt.cpp @@ -1158,20 +1158,25 @@ void ASTStmtWriter::VisitCXXScalarValueInitExpr(CXXScalarValueInitExpr *E) { void ASTStmtWriter::VisitCXXNewExpr(CXXNewExpr *E) { VisitExpr(E); Record.push_back(E->isGlobalNew()); - Record.push_back(E->isArray()); + Record.push_back(E->hasInitializer()); Record.push_back(E->doesUsualArrayDeleteWantSize()); + Record.push_back(E->isArray()); + Record.push_back(E->hadMultipleCandidates()); Record.push_back(E->getNumPlacementArgs()); - Record.push_back(E->StoredInitializationStyle); + Record.push_back(E->getNumConstructorArgs()); Writer.AddDeclRef(E->getOperatorNew(), Record); Writer.AddDeclRef(E->getOperatorDelete(), Record); + Writer.AddDeclRef(E->getConstructor(), Record); Writer.AddTypeSourceInfo(E->getAllocatedTypeSourceInfo(), Record); Writer.AddSourceRange(E->getTypeIdParens(), Record); Writer.AddSourceLocation(E->getStartLoc(), Record); - Writer.AddSourceRange(E->getDirectInitRange(), Record); + Writer.AddSourceLocation(E->getEndLoc(), Record); + Writer.AddSourceLocation(E->getConstructorLParen(), Record); + Writer.AddSourceLocation(E->getConstructorRParen(), Record); for (CXXNewExpr::arg_iterator I = E->raw_arg_begin(), e = E->raw_arg_end(); I != e; ++I) Writer.AddStmt(*I); - + Code = serialization::EXPR_CXX_NEW; } |