mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-26 04:34:41 +00:00
Duncan Sands
09085fe63d
The semantics of invoke require that we always jump to the unwind block
(landing pad) when an exception unwinds through the call. This doesn't quite match the way the dwarf unwinder works: by default it only jumps to the landing pad if the catch or filter specification matches, and otherwise it keeps on unwinding. There are two ways of specifying to the unwinder that it should "always" (more on why there are quotes here later) jump to the landing pad: follow the specification by a 0 typeid, or follow it by the typeid for the NULL typeinfo. GCC does the first, and this patch makes LLVM do the same as gcc. However there is a problem: the unwinder performs optimizations based on C++ semantics (it only expects destructors to be run if the 0 typeid fires - known as "cleanups"), meaning it assumes that no exceptions will be raised and that the raised exception will be reraised at the end of the cleanup code. So if someone writes their own LLVM code using the exception intrinsics they will get a nasty surprise if they don't follow these rules. The other possibility of using the typeid corresponding to NULL (catch-all) causes the unwinder to make no assumptions, so this is probably what we should use in the long-run. However since we are still having trouble getting exception handling working properly, for the moment it seems best to closely imitate GCC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37399 91177308-0d34-0410-b5e6-96231b3b80d8
Low Level Virtual Machine (LLVM) ================================ This directory and its subdirectories contain source code for the Low Level Virtual Machine, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments. LLVM is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt. Please see the HTML documentation provided in docs/index.html for further assistance with LLVM.
Description
Languages
LLVM
52.9%
C++
32.7%
Assembly
13.2%
Python
0.4%
C
0.4%
Other
0.3%