Re-land "[WinEH] Add an EH registration and state insertion pass for 32-bit x86"

This reverts commit r236340.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236359 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Kleckner
2015-05-01 22:40:25 +00:00
parent 5ec52ca1bf
commit 2701a7ff17
10 changed files with 428 additions and 12 deletions

View File

@@ -37,6 +37,7 @@ enum class EncodingType {
ARM, /// Windows NT (Windows on ARM)
CE, /// Windows CE ARM, PowerPC, SH3, SH4
Itanium, /// Windows x64, Windows Itanium (IA-64)
X86, /// Windows x86, uses no CFI, just EH tables
MIPS = Alpha,
};
}
@@ -506,12 +507,13 @@ public:
/// frame information to unwind.
bool usesCFIForEH() const {
return (ExceptionsType == ExceptionHandling::DwarfCFI ||
ExceptionsType == ExceptionHandling::ARM ||
ExceptionsType == ExceptionHandling::WinEH);
ExceptionsType == ExceptionHandling::ARM || usesWindowsCFI());
}
bool usesWindowsCFI() const {
return ExceptionsType == ExceptionHandling::WinEH;
return ExceptionsType == ExceptionHandling::WinEH &&
(WinEHEncodingType != WinEH::EncodingType::Invalid &&
WinEHEncodingType != WinEH::EncodingType::X86);
}
bool doesDwarfUseRelocationsAcrossSections() const {