LLVM 22.0.0git
|
#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 GlobalVariable * | getOrCreateRefVariable (Function &F, SmallDenseMap< GlobalVariable *, GlobalVariable * > &RefMapping, GlobalVariable *GV) |
static Value * | rewriteGlobalVariablesInConstant (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) |
#define DEBUG_TYPE "windows-secure-hot-patch" |
Definition at line 153 of file WindowsSecureHotPatching.cpp.
|
static |
Definition at line 346 of file WindowsSecureHotPatching.cpp.
References llvm::concat(), llvm::dwarf_linker::DebugInfo, F, llvm::DIScope::getFile(), llvm::ConstantExpr::getGetElementPtr(), llvm::Value::getName(), llvm::DataLayout::getTypeSizeInBits(), llvm::GlobalValue::getValueType(), llvm::GlobalValue::LinkOnceAnyLinkage, and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::try_emplace().
|
static |
Definition at line 294 of file WindowsSecureHotPatching.cpp.
References llvm::Value::getName(), llvm::GlobalValue::getValueType(), llvm::GlobalVariable::hasAttribute(), llvm::GlobalVariable::isConstant(), llvm::StringRef::starts_with(), and TypeContainsPointers().
Referenced by rewriteGlobalVariablesInConstant(), and searchConstantExprForGlobalVariables().
INITIALIZE_PASS | ( | WindowsSecureHotPatching | , |
"windows-secure-hot-patch" | , | ||
"Mark functions for Windows hot patch support" | , | ||
false | , | ||
false | |||
) |
Definition at line 201 of file WindowsSecureHotPatching.cpp.
|
static |
Definition at line 409 of file WindowsSecureHotPatching.cpp.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::at(), llvm::CallingConv::C, globalVariableNeedsRedirect(), llvm::IRBuilderBase::Insert(), OpIndex, llvm::SmallVectorTemplateBase< T, bool >::push_back(), rewriteGlobalVariablesInConstant(), and llvm::User::setOperand().
Referenced by rewriteGlobalVariablesInConstant().
|
static |
Definition at line 460 of file WindowsSecureHotPatching.cpp.
References globalVariableNeedsRedirect(), OpIndex, and searchConstantExprForGlobalVariables().
Referenced by searchConstantExprForGlobalVariables().
Definition at line 270 of file WindowsSecureHotPatching.cpp.
References llvm::Type::ArrayTyID, llvm::Type::getArrayElementType(), llvm::Type::getStructElementType(), llvm::Type::getStructNumElements(), llvm::Type::getTypeID(), I, llvm::Type::PointerTyID, llvm::Type::StructTyID, and TypeContainsPointers().
Referenced by globalVariableNeedsRedirect(), and TypeContainsPointers().
|
static |
|
static |