diff options
author | Steve Naroff <snaroff@apple.com> | 2009-01-27 23:20:32 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2009-01-27 23:20:32 +0000 |
commit | c0ac4923f08b25ae973a8ee7942cf3eb89da57b7 (patch) | |
tree | b6b9ce974fc742f015b06cab38436c181c6ebd7c /lib/AST/Expr.cpp | |
parent | db64728e69a45b89870ede13944a934d3c2ed12a (diff) |
Finish making AST BumpPtrAllocation runtime configurable (based on -disable-free).
snaroff% time ../../Release-Asserts/bin/clang INPUTS/Cocoa_h.m
0.179u 0.051s 0:00.23 95.6% 0+0k 0+0io 0pf+0w
snaroff% time ../../Release-Asserts/bin/clang INPUTS/Cocoa_h.m -disable-free
0.169u 0.052s 0:00.22 95.4% 0+0k 0+0io 0pf+0w
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63153 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Expr.cpp')
-rw-r--r-- | lib/AST/Expr.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp index 63484d1b87..8e43f99b67 100644 --- a/lib/AST/Expr.cpp +++ b/lib/AST/Expr.cpp @@ -1387,10 +1387,9 @@ DesignatedInitExpr::Create(ASTContext &C, Designator *Designators, Expr **IndexExprs, unsigned NumIndexExprs, SourceLocation ColonOrEqualLoc, bool UsesColonSyntax, Expr *Init) { - void *Mem = C.getAllocator().Allocate(sizeof(DesignatedInitExpr) + - sizeof(Designator) * NumDesignators + - sizeof(Stmt *) * (NumIndexExprs + 1), - 8); + void *Mem = C.Allocate(sizeof(DesignatedInitExpr) + + sizeof(Designator) * NumDesignators + + sizeof(Stmt *) * (NumIndexExprs + 1), 8); DesignatedInitExpr *DIE = new (Mem) DesignatedInitExpr(C.VoidTy, NumDesignators, ColonOrEqualLoc, UsesColonSyntax, |