35 MachineSanitizerBinaryMetadataLegacy();
39struct MachineSanitizerBinaryMetadata {
46 "Machine Sanitizer Binary Metadata",
false,
false)
48char MachineSanitizerBinaryMetadataLegacy::
ID = 0;
50 MachineSanitizerBinaryMetadataLegacy::
ID;
52MachineSanitizerBinaryMetadataLegacy::MachineSanitizerBinaryMetadataLegacy()
58bool MachineSanitizerBinaryMetadataLegacy::runOnMachineFunction(
60 return MachineSanitizerBinaryMetadata().run(MF);
66 if (!MachineSanitizerBinaryMetadata().
run(MF))
76 const auto &Section = *cast<MDString>(MD->
getOperand(0));
79 auto &AuxMDs = *cast<MDTuple>(MD->
getOperand(1));
81 assert(AuxMDs.getNumOperands() == 1);
83 cast<ConstantAsMetadata>(AuxMDs.getOperand(0))->getValue();
105 LLVMContext::MD_pcsections,
106 MDB.createPCSections({{Section.getString(),
107 {IRB.getInt(NewFeatures), IRB.getInt32(Size)}}}));
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
Class for arbitrary precision integers.
void setBit(unsigned BitPosition)
Set the given bit to 1 whose position is given as "bitPosition".
A container for analyses that lazily runs them and caches their results.
This is an important base class in LLVM.
LLVM_ABI const APInt & getUniqueInteger() const
If C is a constant integer then return its value, otherwise C must be a vector of constant integers,...
MDNode * getMetadata(unsigned KindID) const
Get the current metadata attachments for the given kind, if any.
This provides a uniform API for creating instructions and inserting them into a basic block: either a...
const MDOperand & getOperand(unsigned I) const
The MachineFrameInfo class represents an abstract stack frame until prolog/epilog code is inserted.
Align getObjectAlign(int ObjectIdx) const
Return the alignment of the specified stack object.
int64_t getObjectSize(int ObjectIdx) const
Return the size of the specified object.
unsigned getNumFixedObjects() const
Return the number of fixed objects.
int64_t getObjectOffset(int ObjectIdx) const
Return the assigned stack offset of the specified object from the incoming stack pointer.
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
virtual bool runOnMachineFunction(MachineFunction &MF)=0
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...
MachineFrameInfo & getFrameInfo()
getFrameInfo - Return the frame info object for the current function.
Function & getFunction()
Return the LLVM function that this machine code represents.
static LLVM_ABI PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
A set of analyses that are preserved following a run of a transformation pass.
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
PointerTypeMap run(const Module &M)
Compute the PointerTypeMap for the module M.
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI char & MachineSanitizerBinaryMetadataID
LLVM_ABI PreservedAnalyses getMachineFunctionPassPreservedAnalyses()
Returns the minimum set of Analyses that all machine function passes must preserve.
constexpr int kSanitizerBinaryMetadataUARHasSizeBit
constexpr int kSanitizerBinaryMetadataUARBit
constexpr char kSanitizerBinaryMetadataCoveredSection[]
LLVM_ABI void initializeMachineSanitizerBinaryMetadataLegacyPass(PassRegistry &)
This struct is a compact representation of a valid (non-zero power of two) alignment.
uint64_t value() const
This is a hole in the type system and should not be abused.