Hi Dmitri This seems to be breaking the buildbots. I’m going to revert it for now to get things green again.
http://lab.llvm.org:8013/builders/clang-x86_64-darwin11-nobootstrap-RAincremental/builds/1534 Thanks, Pete On May 9, 2013, at 5:43 PM, Dmitri Gribenko <[email protected]> wrote: > Author: gribozavr > Date: Thu May 9 19:43:44 2013 > New Revision: 181572 > > URL: http://llvm.org/viewvc/llvm-project?rev=181572&view=rev > Log: > ArrayRef'ize ShuffleVectorExpr::setExprs > > But ShuffleVectorExpr should be tail-allocating the storage for expressions. > > Modified: > cfe/trunk/include/clang/AST/Expr.h > cfe/trunk/lib/AST/Expr.cpp > cfe/trunk/lib/Serialization/ASTReaderStmt.cpp > > Modified: cfe/trunk/include/clang/AST/Expr.h > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Expr.h?rev=181572&r1=181571&r2=181572&view=diff > ============================================================================== > --- cfe/trunk/include/clang/AST/Expr.h (original) > +++ cfe/trunk/include/clang/AST/Expr.h Thu May 9 19:43:44 2013 > @@ -3450,7 +3450,7 @@ public: > return cast<Expr>(SubExprs[Index]); > } > > - void setExprs(ASTContext &C, Expr ** Exprs, unsigned NumExprs); > + void setExprs(ASTContext &C, ArrayRef<Expr *> Exprs); > > unsigned getShuffleMaskIdx(ASTContext &Ctx, unsigned N) const { > assert((N < NumExprs - 2) && "Shuffle idx out of range!"); > > Modified: cfe/trunk/lib/AST/Expr.cpp > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Expr.cpp?rev=181572&r1=181571&r2=181572&view=diff > ============================================================================== > --- cfe/trunk/lib/AST/Expr.cpp (original) > +++ cfe/trunk/lib/AST/Expr.cpp Thu May 9 19:43:44 2013 > @@ -3565,13 +3565,12 @@ ShuffleVectorExpr::ShuffleVectorExpr(AST > } > } > > -void ShuffleVectorExpr::setExprs(ASTContext &C, Expr ** Exprs, > - unsigned NumExprs) { > +void ShuffleVectorExpr::setExprs(ASTContext &C, ArrayRef<Expr *> Exprs) { > if (SubExprs) C.Deallocate(SubExprs); > > SubExprs = new (C) Stmt* [NumExprs]; > - this->NumExprs = NumExprs; > - memcpy(SubExprs, Exprs, sizeof(Expr *) * NumExprs); > + this->NumExprs = Exprs.size(); > + memcpy(SubExprs, Exprs.data(), sizeof(Expr *) * Exprs.size()); > } > > GenericSelectionExpr::GenericSelectionExpr(ASTContext &Context, > > Modified: cfe/trunk/lib/Serialization/ASTReaderStmt.cpp > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReaderStmt.cpp?rev=181572&r1=181571&r2=181572&view=diff > ============================================================================== > --- cfe/trunk/lib/Serialization/ASTReaderStmt.cpp (original) > +++ cfe/trunk/lib/Serialization/ASTReaderStmt.cpp Thu May 9 19:43:44 2013 > @@ -847,7 +847,7 @@ void ASTStmtReader::VisitShuffleVectorEx > unsigned NumExprs = Record[Idx++]; > while (NumExprs--) > Exprs.push_back(Reader.ReadSubExpr()); > - E->setExprs(Reader.getContext(), Exprs.data(), Exprs.size()); > + E->setExprs(Reader.getContext(), Exprs); > E->setBuiltinLoc(ReadSourceLocation(Record, Idx)); > E->setRParenLoc(ReadSourceLocation(Record, Idx)); > } > > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
