r181572 - ArrayRef'ize ShuffleVectorExpr::setExprs
Pete Cooper
peter_cooper at apple.com
Fri May 10 10:06:20 PDT 2013
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 <gribozavr at gmail.com> 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
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130510/3cfe598e/attachment.html>
More information about the cfe-commits
mailing list