[PATCH] Classify functions by EH personality type rather than using the triple
David Majnemer
david.majnemer at gmail.com
Thu Jan 22 15:36:47 PST 2015
================
Comment at: include/llvm/MC/MCAsmInfo.h:491
@@ -491,6 +490,3 @@
WinEH::EncodingType getWinEHEncodingType() const { return WinEHEncodingType; }
-
- /// Return true if the exception handling type uses the language-specific data
- /// area (LSDA) format specified by the Itanium C++ ABI.
- bool usesItaniumLSDAForExceptions() const {
+ bool isExceptionHandlingDwarf() const {
return (ExceptionsType == ExceptionHandling::DwarfCFI ||
----------------
This name isn't great, can we come up with a better one? Perhaps `usesCFI`?
================
Comment at: lib/CodeGen/AsmPrinter/DwarfCFIException.cpp:54
@@ -53,3 +53,3 @@
- if (!Asm->MAI->usesItaniumLSDAForExceptions())
+ if (!Asm->MAI->isExceptionHandlingDwarf())
return;
----------------
This should probably be an assert.
================
Comment at: lib/CodeGen/MachineModuleInfo.cpp:568-569
@@ +567,4 @@
+ PersonalityTypeCache = EHPersonality::None;
+ else if (Per->getName() == "__C_specific_handler")
+ PersonalityTypeCache = EHPersonality::Win64SEH;
+ else // Assume everything else is Itanium.
----------------
This doesn't work for C++ exceptions, they use the same personality routine name for 32-bit and 64-bit.
http://reviews.llvm.org/D6987
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list