28#define DEBUG_TYPE "ehcontguard-catchret"
30STATISTIC(EHContGuardTargetsFound,
"Number of EHCont Guard targets");
44 StringRef getPassName()
const override {
45 return "EH Cont Guard catchret targets";
48 bool runOnMachineFunction(MachineFunction &MF)
override;
53char EHContGuardTargets::ID = 0;
56 "Insert symbols at valid targets for /guard:ehcont",
false,
59 return new EHContGuardTargets();
74 for (MachineBasicBlock &
MBB : MF) {
77 EHContGuardTargetsFound++;
Module.h This file contains the declarations for the Module class.
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
This file defines the 'Statistic' class, which is designed to be an easy way to expose various metric...
#define STATISTIC(VARNAME, DESC)
FunctionPass class - This class is used to implement most global optimizations.
Module * getParent()
Get the module that this global value is contained inside of...
LLVM_ABI MCSymbol * getEHContSymbol() const
Return the Windows EH Continuation Symbol for this basic block.
bool isEHContTarget() const
Returns true if this is a target of Windows EH Continuation Guard.
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
Function & getFunction()
Return the LLVM function that this machine code represents.
bool hasEHContTarget() const
Metadata * getModuleFlag(StringRef Key) const
Return the corresponding value if Key appears in module flags, otherwise return null.
static LLVM_ABI PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI void initializeEHContGuardTargetsPass(PassRegistry &)
LLVM_ABI FunctionPass * createEHContGuardTargetsPass()
Creates Windows EH Continuation Guard target identification pass.