Add the ExceptionHandling::MSVC enumeration

It is intended to be used for a family of personality functions that
have similar IR preparation requirements. Typically when interoperating
with MSVC personality functions, bits of functionality need to be
outlined from the main function into helper functions. There is also
usually more than one landing pad per invoke, which does not match the
LLVM IR landingpad representation.

None of this is implemented yet. This change just adds a new enum that
is active for *-windows-msvc and delegates to the EH removal preparation
pass.  No functionality change for other targets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224625 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Kleckner
2014-12-19 22:19:48 +00:00
parent 9ccbf1a260
commit 0f85d54670
10 changed files with 25 additions and 17 deletions

View File

@@ -47,6 +47,7 @@ enum class ExceptionHandling {
SjLj, /// setjmp/longjmp based exceptions
ARM, /// ARM EHABI
ItaniumWinEH, /// Itanium EH built on Windows unwind info (.pdata and .xdata)
MSVC, /// MSVC compatible exception handling
};
namespace LCOMM {
@@ -492,6 +493,11 @@ public:
ExceptionsType == ExceptionHandling::ItaniumWinEH);
}
bool usesWindowsCFI() const {
return ExceptionsType == ExceptionHandling::ItaniumWinEH ||
ExceptionsType == ExceptionHandling::MSVC;
}
bool doesDwarfUseRelocationsAcrossSections() const {
return DwarfUsesRelocationsAcrossSections;
}