summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2010-01-21 15:20:48 +0000
committerMike Stump <mrs@apple.com>2010-01-21 15:20:48 +0000
commit04c6851cd6053c638e68bf1d7b99dda14ea267fb (patch)
tree2993f391bd3cc8b6fe8f2b782a3a9fdcdba35dd8 /clang/lib/Sema/SemaDecl.cpp
parentd2eba45be30aed16891c94553f86e8af5e800b78 (diff)
downloadbcm5719-llvm-04c6851cd6053c638e68bf1d7b99dda14ea267fb.tar.gz
bcm5719-llvm-04c6851cd6053c638e68bf1d7b99dda14ea267fb.zip
Speed up compilation by avoiding generating exceptional edges from
CallExprs as those edges help cause a n^2 explosion in the number of destructor calls. Other consumers, such as static analysis, that would like to have more a more complete CFG can select the inclusion of those edges as CFG build time. This also fixes up the two compilation users of CFGs to be tolerant of having or not having those edges. All catch code is assumed be to live if we didn't generate the exceptional edges for CallExprs. llvm-svn: 94074
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 1e1df069ea2..b6b3b5bee16 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -4102,7 +4102,9 @@ Sema::DeclPtrTy Sema::ActOnFinishFunctionBody(DeclPtrTy D, StmtArg BodyArg,
Decl *dcl = D.getAs<Decl>();
Stmt *Body = BodyArg.takeAs<Stmt>();
- AnalysisContext AC(dcl);
+ // Don't generate EH edges for CallExprs as we'd like to avoid the n^2
+ // explosion for destrutors that can result and the compile time hit.
+ AnalysisContext AC(dcl, false);
FunctionDecl *FD = 0;
FunctionTemplateDecl *FunTmpl = dyn_cast_or_null<FunctionTemplateDecl>(dcl);
if (FunTmpl)
OpenPOWER on IntegriCloud