]> granicus.if.org Git - clang/commit
When initializing thread-safe statics, put the call to
authorDouglas Gregor <dgregor@apple.com>
Sun, 16 May 2010 01:24:12 +0000 (01:24 +0000)
committerDouglas Gregor <dgregor@apple.com>
Sun, 16 May 2010 01:24:12 +0000 (01:24 +0000)
commit86a3a03667bdb0dcab7e6a2877dfd234b07a6d43
tree4d7a3c092872a94b8b37bbd476c9a2857ec1dfa4
parent1eb2e59338c4b9c0429fc39ca98662adc9e7a3f2
When initializing thread-safe statics, put the call to
__cxa_guard_abort along the exceptional edge into (in effect) a nested
"try" that rethrows after aborting. Fixes PR7144 and the remaining
Boost.ProgramOptions failures, along with the regressions that r103880
caused.

The crucial difference between this and r103880 is that we now follow
LLVM's little dance with the llvm.eh.exception and llvm.eh.selector
calls, then use _Unwind_Resume_or_Rethrow to rethrow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103892 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGDeclCXX.cpp
lib/CodeGen/CGException.cpp
lib/CodeGen/CodeGenFunction.h
test/CodeGenCXX/threadsafe-statics-exceptions.cpp [new file with mode: 0644]