#include "llvm/Transforms/Instrumentation/SanitizerBinaryMetadata.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/MDBuilder.h"
#include "llvm/InitializePasses.h"
#include "llvm/Pass.h"
#include <algorithm>
usingnamespacellvm;
namespace {
class MachineSanitizerBinaryMetadata : public MachineFunctionPass { … };
}
INITIALIZE_PASS(…)
char MachineSanitizerBinaryMetadata::ID = …;
char &llvm::MachineSanitizerBinaryMetadataID = …;
MachineSanitizerBinaryMetadata::MachineSanitizerBinaryMetadata()
: … { … }
bool MachineSanitizerBinaryMetadata::runOnMachineFunction(MachineFunction &MF) { … }