diff options
author | John McCall <rjmccall@apple.com> | 2010-08-10 18:51:44 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-08-10 18:51:44 +0000 |
commit | 62eb9a8e843cd9a1b07b7204a3cb3a35d4662b60 (patch) | |
tree | fba1756de0a16da32f63af03feb6f2e5848797bb /clang/lib/CodeGen/CGDeclCXX.cpp | |
parent | 53c502204046ac583f447903272a2aa1288e5b8e (diff) | |
download | bcm5719-llvm-62eb9a8e843cd9a1b07b7204a3cb3a35d4662b60.tar.gz bcm5719-llvm-62eb9a8e843cd9a1b07b7204a3cb3a35d4662b60.zip |
When initializing a static local, pop the guard-abort EH cleanup after
the variable is fully initialized.
llvm-svn: 110704
Diffstat (limited to 'clang/lib/CodeGen/CGDeclCXX.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGDeclCXX.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGDeclCXX.cpp b/clang/lib/CodeGen/CGDeclCXX.cpp index ddb1abc70a1..38345e47419 100644 --- a/clang/lib/CodeGen/CGDeclCXX.cpp +++ b/clang/lib/CodeGen/CGDeclCXX.cpp @@ -398,6 +398,10 @@ CodeGenFunction::EmitStaticCXXBlockVarDeclInit(const VarDecl &D, EmitDeclInit(*this, D, GV); if (ThreadsafeStatics) { + // Pop the guard-abort cleanup if we pushed one. + if (Exceptions) + PopCleanupBlock(); + // Call __cxa_guard_release. This cannot throw. Builder.CreateCall(getGuardReleaseFn(*this), GuardVariable); } else { |