================ Comment at: lib/AST/Stmt.cpp:1040-1042 @@ +1039,5 @@ + // Copy all Capture objects into the context. + unsigned Size = NumCaptures * sizeof(Capture); + void *buffer = Context.Allocate(Size, llvm::alignOf<Capture *>()); + memcpy(buffer, begin, Size); + ---------------- Wei Pan wrote: > Dmitri Gribenko wrote: > > Please use tail allocation for this. > This was following the implementation of BlockDecl and LambdaExpr. What do > you mean tail allocation here? Tail allocation = allocate memory for this array after the CapturedStmt object itself, to improve data locality. Please take a look at CXXTryStmt::Create, for example.
http://llvm-reviews.chandlerc.com/D370 _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
