Long live the exception handling!

This patch fills the last necessary bits to enable exceptions
handling in LLVM. Currently only on x86-32/linux.

In fact, this patch adds necessary intrinsics (and their lowering) which
represent really weird target-specific gcc builtins used inside unwinder.

After corresponding llvm-gcc patch will land (easy) exceptions should be
more or less workable. However, exceptions handling support should not be 
thought as 'finished': I expect many small and not so small glitches
everywhere.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39855 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Anton Korobeynikov
2007-07-14 14:06:15 +00:00
parent a73d11efd4
commit 2365f51ed0
25 changed files with 257 additions and 35 deletions

View File

@ -1030,6 +1030,9 @@ private:
// Personalities - Vector of all personality functions ever seen. Used to emit
// common EH frames.
std::vector<Function *> Personalities;
bool CallsEHReturn;
bool CallsUnwindInit;
public:
static char ID; // Pass identification, replacement for typeid
@ -1072,6 +1075,12 @@ public:
/// needsFrameInfo - Returns true if we need to gather callee-saved register
/// move info for the frame.
bool needsFrameInfo() const;
bool callsEHReturn() const { return CallsEHReturn; }
void setCallsEHReturn(bool b) { CallsEHReturn = b; }
bool callsUnwindInit() const { return CallsUnwindInit; }
void setCallsUnwindInit(bool b) { CallsUnwindInit = b; }
/// NextLabelID - Return the next unique label id.
///