mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 05:22:04 +00:00
Classify functions by EH personality type rather than using the triple
This mostly reverts commit r222062 and replaces it with a new enum. At some point this enum will grow at least for other MSVC EH personalities. Also beefs up the way we were sniffing the personality function. Previously we would emit the Itanium LSDA despite using __C_specific_handler. Reviewers: majnemer Differential Revision: http://reviews.llvm.org/D6987 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226920 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -46,6 +46,13 @@
|
||||
|
||||
namespace llvm {
|
||||
|
||||
/// Different personality functions used by a function.
|
||||
enum class EHPersonality {
|
||||
None, /// No exception handling
|
||||
Itanium, /// An Itanium C++ EH personality like __gxx_personality_seh0
|
||||
Win64SEH, /// x86_64 SEH, uses __C_specific_handler
|
||||
};
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Forward declarations.
|
||||
class Constant;
|
||||
@@ -169,6 +176,10 @@ class MachineModuleInfo : public ImmutablePass {
|
||||
/// details.
|
||||
bool UsesMorestackAddr;
|
||||
|
||||
EHPersonality PersonalityTypeCache;
|
||||
|
||||
EHPersonality getPersonalityTypeSlow();
|
||||
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
|
||||
@@ -413,6 +424,13 @@ public:
|
||||
/// of one is required to emit exception handling info.
|
||||
const Function *getPersonality() const;
|
||||
|
||||
/// Classify the personality function amongst known EH styles.
|
||||
EHPersonality getPersonalityType() {
|
||||
if (PersonalityTypeCache != EHPersonality::None)
|
||||
return PersonalityTypeCache;
|
||||
return getPersonalityTypeSlow();
|
||||
}
|
||||
|
||||
/// setVariableDbgInfo - Collect information used to emit debugging
|
||||
/// information of a variable.
|
||||
void setVariableDbgInfo(MDNode *Var, MDNode *Expr, unsigned Slot,
|
||||
|
||||
Reference in New Issue
Block a user