forked from OSchip/llvm-project
Rename EHPersonality::MSVC_Win64SEH to EHPersonality::MSVC_TableSEH. NFC.
The types of SEH aren't x86(-32) vs x64 but rather stack-based exception chaining vs table-based exception handling. x86-32 is the only arch for which Windows uses the former. 32-bit ARM would use what is called Win64SEH today, which is a bit confusing so instead let's just rename it to be a bit more clear. Reviewed By: compnerd, rnk Differential Revision: https://reviews.llvm.org/D90117
This commit is contained in:
parent
624fc63a05
commit
4c0a016927
|
@ -28,7 +28,7 @@ enum class EHPersonality {
|
|||
GNU_CXX_SjLj,
|
||||
GNU_ObjC,
|
||||
MSVC_X86SEH,
|
||||
MSVC_Win64SEH,
|
||||
MSVC_TableSEH,
|
||||
MSVC_CXX,
|
||||
CoreCLR,
|
||||
Rust,
|
||||
|
@ -51,7 +51,7 @@ inline bool isAsynchronousEHPersonality(EHPersonality Pers) {
|
|||
// unknown personalities don't catch asynch exceptions.
|
||||
switch (Pers) {
|
||||
case EHPersonality::MSVC_X86SEH:
|
||||
case EHPersonality::MSVC_Win64SEH:
|
||||
case EHPersonality::MSVC_TableSEH:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
|
@ -65,7 +65,7 @@ inline bool isFuncletEHPersonality(EHPersonality Pers) {
|
|||
switch (Pers) {
|
||||
case EHPersonality::MSVC_CXX:
|
||||
case EHPersonality::MSVC_X86SEH:
|
||||
case EHPersonality::MSVC_Win64SEH:
|
||||
case EHPersonality::MSVC_TableSEH:
|
||||
case EHPersonality::CoreCLR:
|
||||
return true;
|
||||
default:
|
||||
|
@ -80,7 +80,7 @@ inline bool isScopedEHPersonality(EHPersonality Pers) {
|
|||
switch (Pers) {
|
||||
case EHPersonality::MSVC_CXX:
|
||||
case EHPersonality::MSVC_X86SEH:
|
||||
case EHPersonality::MSVC_Win64SEH:
|
||||
case EHPersonality::MSVC_TableSEH:
|
||||
case EHPersonality::CoreCLR:
|
||||
case EHPersonality::Wasm_CXX:
|
||||
return true;
|
||||
|
|
|
@ -24,22 +24,22 @@ EHPersonality llvm::classifyEHPersonality(const Value *Pers) {
|
|||
if (!F)
|
||||
return EHPersonality::Unknown;
|
||||
return StringSwitch<EHPersonality>(F->getName())
|
||||
.Case("__gnat_eh_personality", EHPersonality::GNU_Ada)
|
||||
.Case("__gxx_personality_v0", EHPersonality::GNU_CXX)
|
||||
.Case("__gxx_personality_seh0", EHPersonality::GNU_CXX)
|
||||
.Case("__gxx_personality_sj0", EHPersonality::GNU_CXX_SjLj)
|
||||
.Case("__gcc_personality_v0", EHPersonality::GNU_C)
|
||||
.Case("__gcc_personality_seh0", EHPersonality::GNU_C)
|
||||
.Case("__gcc_personality_sj0", EHPersonality::GNU_C_SjLj)
|
||||
.Case("__objc_personality_v0", EHPersonality::GNU_ObjC)
|
||||
.Case("_except_handler3", EHPersonality::MSVC_X86SEH)
|
||||
.Case("_except_handler4", EHPersonality::MSVC_X86SEH)
|
||||
.Case("__C_specific_handler", EHPersonality::MSVC_Win64SEH)
|
||||
.Case("__CxxFrameHandler3", EHPersonality::MSVC_CXX)
|
||||
.Case("ProcessCLRException", EHPersonality::CoreCLR)
|
||||
.Case("rust_eh_personality", EHPersonality::Rust)
|
||||
.Case("__gxx_wasm_personality_v0", EHPersonality::Wasm_CXX)
|
||||
.Default(EHPersonality::Unknown);
|
||||
.Case("__gnat_eh_personality", EHPersonality::GNU_Ada)
|
||||
.Case("__gxx_personality_v0", EHPersonality::GNU_CXX)
|
||||
.Case("__gxx_personality_seh0", EHPersonality::GNU_CXX)
|
||||
.Case("__gxx_personality_sj0", EHPersonality::GNU_CXX_SjLj)
|
||||
.Case("__gcc_personality_v0", EHPersonality::GNU_C)
|
||||
.Case("__gcc_personality_seh0", EHPersonality::GNU_C)
|
||||
.Case("__gcc_personality_sj0", EHPersonality::GNU_C_SjLj)
|
||||
.Case("__objc_personality_v0", EHPersonality::GNU_ObjC)
|
||||
.Case("_except_handler3", EHPersonality::MSVC_X86SEH)
|
||||
.Case("_except_handler4", EHPersonality::MSVC_X86SEH)
|
||||
.Case("__C_specific_handler", EHPersonality::MSVC_TableSEH)
|
||||
.Case("__CxxFrameHandler3", EHPersonality::MSVC_CXX)
|
||||
.Case("ProcessCLRException", EHPersonality::CoreCLR)
|
||||
.Case("rust_eh_personality", EHPersonality::Rust)
|
||||
.Case("__gxx_wasm_personality_v0", EHPersonality::Wasm_CXX)
|
||||
.Default(EHPersonality::Unknown);
|
||||
}
|
||||
|
||||
StringRef llvm::getEHPersonalityName(EHPersonality Pers) {
|
||||
|
@ -51,7 +51,8 @@ StringRef llvm::getEHPersonalityName(EHPersonality Pers) {
|
|||
case EHPersonality::GNU_C_SjLj: return "__gcc_personality_sj0";
|
||||
case EHPersonality::GNU_ObjC: return "__objc_personality_v0";
|
||||
case EHPersonality::MSVC_X86SEH: return "_except_handler3";
|
||||
case EHPersonality::MSVC_Win64SEH: return "__C_specific_handler";
|
||||
case EHPersonality::MSVC_TableSEH:
|
||||
return "__C_specific_handler";
|
||||
case EHPersonality::MSVC_CXX: return "__CxxFrameHandler3";
|
||||
case EHPersonality::CoreCLR: return "ProcessCLRException";
|
||||
case EHPersonality::Rust: return "rust_eh_personality";
|
||||
|
|
|
@ -137,8 +137,8 @@ void WinException::endFunction(const MachineFunction *MF) {
|
|||
|
||||
endFuncletImpl();
|
||||
|
||||
// endFunclet will emit the necessary .xdata tables for x64 SEH.
|
||||
if (Per == EHPersonality::MSVC_Win64SEH && MF->hasEHFunclets())
|
||||
// endFunclet will emit the necessary .xdata tables for table-based SEH.
|
||||
if (Per == EHPersonality::MSVC_TableSEH && MF->hasEHFunclets())
|
||||
return;
|
||||
|
||||
if (shouldEmitPersonality || shouldEmitLSDA) {
|
||||
|
@ -151,7 +151,7 @@ void WinException::endFunction(const MachineFunction *MF) {
|
|||
|
||||
// Emit the tables appropriate to the personality function in use. If we
|
||||
// don't recognize the personality, assume it uses an Itanium-style LSDA.
|
||||
if (Per == EHPersonality::MSVC_Win64SEH)
|
||||
if (Per == EHPersonality::MSVC_TableSEH)
|
||||
emitCSpecificHandlerTable(MF);
|
||||
else if (Per == EHPersonality::MSVC_X86SEH)
|
||||
emitExceptHandlerTable(MF);
|
||||
|
@ -269,7 +269,7 @@ void WinException::endFuncletImpl() {
|
|||
MCSymbol *FuncInfoXData = Asm->OutContext.getOrCreateSymbol(
|
||||
Twine("$cppxdata$", FuncLinkageName));
|
||||
Asm->OutStreamer->emitValue(create32bitRef(FuncInfoXData), 4);
|
||||
} else if (Per == EHPersonality::MSVC_Win64SEH && MF->hasEHFunclets() &&
|
||||
} else if (Per == EHPersonality::MSVC_TableSEH && MF->hasEHFunclets() &&
|
||||
!CurrentFuncletEntry->isEHFuncletEntry()) {
|
||||
// Emit an UNWIND_INFO struct describing the prologue.
|
||||
Asm->OutStreamer->EmitWinEHHandlerData();
|
||||
|
|
|
@ -3105,7 +3105,7 @@ static bool isCatchAll(EHPersonality Personality, Constant *TypeInfo) {
|
|||
case EHPersonality::GNU_CXX_SjLj:
|
||||
case EHPersonality::GNU_ObjC:
|
||||
case EHPersonality::MSVC_X86SEH:
|
||||
case EHPersonality::MSVC_Win64SEH:
|
||||
case EHPersonality::MSVC_TableSEH:
|
||||
case EHPersonality::MSVC_CXX:
|
||||
case EHPersonality::CoreCLR:
|
||||
case EHPersonality::Wasm_CXX:
|
||||
|
|
Loading…
Reference in New Issue