28#define DEBUG_TYPE "ehcontguard-catchret"
30STATISTIC(EHContGuardTargetsFound,
"Number of EHCont Guard targets");
42 StringRef getPassName()
const override {
43 return "EH Cont Guard catchret targets";
46 bool runOnMachineFunction(MachineFunction &MF)
override;
51char EHContGuardTargets::ID = 0;
54 "Insert symbols at valid targets for /guard:ehcont",
false,
57 return new EHContGuardTargets();
72 for (MachineBasicBlock &
MBB : MF) {
75 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.
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI FunctionPass * createEHContGuardTargetsPass()
Creates Windows EH Continuation Guard target identification pass.