|
LLVM 24.0.0git
|
This file contains a machine function pass to insert a symbol after each call to _setjmp and store this in the MachineFunction's LongjmpTargets vector. More...
#include "llvm/CodeGen/CFGuardLongjmp.h"#include "llvm/ADT/Statistic.h"#include "llvm/CodeGen/MachineBasicBlock.h"#include "llvm/CodeGen/MachineFunctionAnalysisManager.h"#include "llvm/CodeGen/MachineFunctionPass.h"#include "llvm/CodeGen/MachineInstr.h"#include "llvm/CodeGen/MachineModuleInfo.h"#include "llvm/CodeGen/MachineOperand.h"#include "llvm/CodeGen/MachinePassManager.h"#include "llvm/CodeGen/Passes.h"#include "llvm/IR/Analysis.h"#include "llvm/IR/Module.h"#include "llvm/InitializePasses.h"#include "llvm/Pass.h"Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "cfguard-longjmp" |
Functions | |
| STATISTIC (CFGuardLongjmpTargets, "Number of Control Flow Guard longjmp targets") | |
| INITIALIZE_PASS (CFGuardLongjmpLegacy, "CFGuardLongjmp", "Insert symbols at valid longjmp targets for /guard:cf", false, false) FunctionPass *llvm | |
| static bool | runCFGuardLongjmpOnMachineFunction (MachineFunction &MF) |
This file contains a machine function pass to insert a symbol after each call to _setjmp and store this in the MachineFunction's LongjmpTargets vector.
This will be used to emit the table of valid longjmp targets used by Control Flow Guard.
Definition in file CFGuardLongjmp.cpp.
| #define DEBUG_TYPE "cfguard-longjmp" |
Definition at line 34 of file CFGuardLongjmp.cpp.
| INITIALIZE_PASS | ( | CFGuardLongjmpLegacy | , |
| "CFGuardLongjmp" | , | ||
| "Insert symbols at valid longjmp targets for /guard:cf" | , | ||
| false | , | ||
| false | ) |
Definition at line 65 of file CFGuardLongjmp.cpp.
References llvm::createCFGuardLongjmpLegacyPass().
|
static |
Definition at line 72 of file CFGuardLongjmp.cpp.
References llvm::MachineFunction::addLongjmpTarget(), llvm::Function::callsFunctionThatReturnsTwice(), llvm::Disabled, llvm::dyn_cast(), llvm::SmallVectorTemplateCommon< T, typename >::empty(), F, llvm::MachineFunction::getContext(), llvm::Module::getControlFlowGuardMode(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getName(), llvm::MCContext::getOrCreateSymbol(), llvm::GlobalValue::getParent(), MBB, MI, and llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by llvm::CFGuardLongjmpPass::run().
| STATISTIC | ( | CFGuardLongjmpTargets | , |
| "Number of Control Flow Guard longjmp targets" | ) |