summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjCGNU.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-07-13 20:32:21 +0000
committerJohn McCall <rjmccall@apple.com>2010-07-13 20:32:21 +0000
commit2b7fc3828e2245604a9b518167418d4bf650d5f2 (patch)
tree4c139957fc2a59adadc0315e4f5dead1e551c2ac /clang/lib/CodeGen/CGObjCGNU.cpp
parentcaca5488dc290c3cbca702a90e3f7a8be7b23c06 (diff)
downloadbcm5719-llvm-2b7fc3828e2245604a9b518167418d4bf650d5f2.tar.gz
bcm5719-llvm-2b7fc3828e2245604a9b518167418d4bf650d5f2.zip
Teach IR generation how to lazily emit cleanups. This has a lot of advantages,
mostly in avoiding unnecessary work at compile time but also in producing more sensible block orderings. Move the destructor cleanups for local variables over to use lazy cleanups. Eventually all cleanups will do this; for now we have some awkward code duplication. Tell IR generation just to never produce landing pads in -fno-exceptions. This is a much more comprehensive solution to a problem which previously was half-solved by checks in most cleanup-generation spots. llvm-svn: 108270
Diffstat (limited to 'clang/lib/CodeGen/CGObjCGNU.cpp')
-rw-r--r--clang/lib/CodeGen/CGObjCGNU.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGObjCGNU.cpp b/clang/lib/CodeGen/CGObjCGNU.cpp
index c9da348cbfe..f3c80bcf08e 100644
--- a/clang/lib/CodeGen/CGObjCGNU.cpp
+++ b/clang/lib/CodeGen/CGObjCGNU.cpp
@@ -1871,8 +1871,7 @@ void CGObjCGNU::EmitSynchronizedStmt(CodeGen::CodeGenFunction &CGF,
// Register an all-paths cleanup to release the lock.
{
- CodeGenFunction::CleanupBlock
- ReleaseScope(CGF, CodeGenFunction::NormalAndEHCleanup);
+ CodeGenFunction::CleanupBlock ReleaseScope(CGF, NormalAndEHCleanup);
llvm::Value *SyncExit = CGM.CreateRuntimeFunction(FTy, "objc_sync_exit");
SyncArg = CGF.Builder.CreateBitCast(SyncArg, IdTy);
OpenPOWER on IntegriCloud