On Oct 17, 2007, at 3:17 PM, Ted Kremenek wrote: > assert (InsertPos != NULL); > > - // FIXME: more intelligent calculation of alignment. > - TreeTy* T = (TreeTy*) Allocator.Allocate(sizeof(*T),16); > - > + // Allocate the new tree node and insert it into the cache. > + TreeTy* T = Allocator.Allocate<TreeTy>(); > new (T) TreeTy(L,R,V,IncrementHeight(L,R)); > - > Cache.InsertNode(T,InsertPos);
Random thought: The allocator "Allocate" method returns a pointer to uninitialized memory. Should'nt it return void *? This would give you: void *Tmp = Allocator.Allocate<TreeTy>(); TreeTy *T = new (Tmp) TreeTy(L,R,V,IncrementHeight(L,R)); ... Reasonable? -Chris _______________________________________________ llvm-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
