LLVM 22.0.0git
Macros | Functions | Variables
WindowsSecureHotPatching.cpp File Reference
#include "llvm/ADT/SmallSet.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/DIBuilder.h"
#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/Module.h"
#include "llvm/InitializePasses.h"
#include "llvm/Pass.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/LineIterator.h"
#include "llvm/Support/MemoryBuffer.h"

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "windows-secure-hot-patch"
 

Functions

 INITIALIZE_PASS (WindowsSecureHotPatching, "windows-secure-hot-patch", "Mark functions for Windows hot patch support", false, false) ModulePass *llvm
 
static bool TypeContainsPointers (Type *ty)
 
static bool globalVariableNeedsRedirect (GlobalVariable *GV)
 
static GlobalVariablegetOrCreateRefVariable (Function &F, SmallDenseMap< GlobalVariable *, GlobalVariable * > &RefMapping, GlobalVariable *GV)
 
static ValuerewriteGlobalVariablesInConstant (Constant *C, SmallDenseMap< GlobalVariable *, Value * > &GVLoadMap, IRBuilder<> &IRBuilderAtEntry)
 
static bool searchConstantExprForGlobalVariables (Value *V, SmallDenseMap< GlobalVariable *, Value * > &GVLoadMap, SmallVector< GlobalVariableUse > &GVUses)
 

Variables

static cl::opt< std::string > LLVMMSSecureHotPatchFunctionsFile ("ms-secure-hotpatch-functions-file", cl::value_desc("filename"), cl::desc("A file containing list of mangled function names to mark for " "Windows Secure Hot-Patching"))
 
static cl::list< std::string > LLVMMSSecureHotPatchFunctionsList ("ms-secure-hotpatch-functions-list", cl::value_desc("list"), cl::desc("A list of mangled function names to mark for Windows Secure " "Hot-Patching"), cl::CommaSeparated)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "windows-secure-hot-patch"

Definition at line 153 of file WindowsSecureHotPatching.cpp.

Function Documentation

◆ getOrCreateRefVariable()

static GlobalVariable * getOrCreateRefVariable ( Function F,
SmallDenseMap< GlobalVariable *, GlobalVariable * > &  RefMapping,
GlobalVariable GV 
)
static

◆ globalVariableNeedsRedirect()

static bool globalVariableNeedsRedirect ( GlobalVariable GV)
static

◆ INITIALIZE_PASS()

INITIALIZE_PASS ( WindowsSecureHotPatching  ,
"windows-secure-hot-patch"  ,
"Mark functions for Windows hot patch support"  ,
false  ,
false   
)

Definition at line 201 of file WindowsSecureHotPatching.cpp.

◆ rewriteGlobalVariablesInConstant()

static Value * rewriteGlobalVariablesInConstant ( Constant C,
SmallDenseMap< GlobalVariable *, Value * > &  GVLoadMap,
IRBuilder<> &  IRBuilderAtEntry 
)
static

◆ searchConstantExprForGlobalVariables()

static bool searchConstantExprForGlobalVariables ( Value V,
SmallDenseMap< GlobalVariable *, Value * > &  GVLoadMap,
SmallVector< GlobalVariableUse > &  GVUses 
)
static

◆ TypeContainsPointers()

static bool TypeContainsPointers ( Type ty)
static

Variable Documentation

◆ LLVMMSSecureHotPatchFunctionsFile

cl::opt< std::string > LLVMMSSecureHotPatchFunctionsFile("ms-secure-hotpatch-functions-file", cl::value_desc("filename"), cl::desc("A file containing list of mangled function names to mark for " "Windows Secure Hot-Patching")) ( "ms-secure-hotpatch-functions-file"  ,
cl::value_desc("filename")  ,
cl::desc("A file containing list of mangled function names to mark for " "Windows Secure Hot-Patching")   
)
static

◆ LLVMMSSecureHotPatchFunctionsList

cl::list< std::string > LLVMMSSecureHotPatchFunctionsList("ms-secure-hotpatch-functions-list", cl::value_desc("list"), cl::desc("A list of mangled function names to mark for Windows Secure " "Hot-Patching"), cl::CommaSeparated) ( "ms-secure-hotpatch-functions-list"  ,
cl::value_desc("list")  ,
cl::desc("A list of mangled function names to mark for Windows Secure " "Hot-Patching")  ,
cl::CommaSeparated   
)
static