mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-23 01:24:30 +00:00
Unify the two EH personality classification routines I wrote
We only need one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229193 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -35,6 +35,7 @@
|
||||
#include "llvm/ADT/PointerIntPair.h"
|
||||
#include "llvm/ADT/SmallPtrSet.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include "llvm/Analysis/LibCallSemantics.h"
|
||||
#include "llvm/IR/DebugLoc.h"
|
||||
#include "llvm/IR/Metadata.h"
|
||||
#include "llvm/IR/ValueHandle.h"
|
||||
@ -46,13 +47,6 @@
|
||||
|
||||
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;
|
||||
@ -178,8 +172,6 @@ class MachineModuleInfo : public ImmutablePass {
|
||||
|
||||
EHPersonality PersonalityTypeCache;
|
||||
|
||||
EHPersonality getPersonalityTypeSlow();
|
||||
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
|
||||
@ -425,11 +417,7 @@ public:
|
||||
const Function *getPersonality() const;
|
||||
|
||||
/// Classify the personality function amongst known EH styles.
|
||||
EHPersonality getPersonalityType() {
|
||||
if (PersonalityTypeCache != EHPersonality::None)
|
||||
return PersonalityTypeCache;
|
||||
return getPersonalityTypeSlow();
|
||||
}
|
||||
EHPersonality getPersonalityType();
|
||||
|
||||
/// setVariableDbgInfo - Collect information used to emit debugging
|
||||
/// information of a variable.
|
||||
|
Reference in New Issue
Block a user