#include "llvm/CodeGen/JMCInstrumenter.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/IR/DIBuilder.h"
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Type.h"
#include "llvm/InitializePasses.h"
#include "llvm/Pass.h"
#include "llvm/Support/DJB.h"
#include "llvm/Support/Path.h"
#include "llvm/Transforms/Utils/ModuleUtils.h"
usingnamespacellvm;
#define DEBUG_TYPE …
static bool runImpl(Module &M);
namespace {
struct JMCInstrumenter : public ModulePass { … };
char JMCInstrumenter::ID = …;
}
PreservedAnalyses JMCInstrumenterPass::run(Module &M, ModuleAnalysisManager &) { … }
INITIALIZE_PASS(…)
ModulePass *llvm::createJMCInstrumenterPass() { … }
namespace {
const char CheckFunctionName[] = …;
std::string getFlagName(DISubprogram &SP, bool UseX86FastCall) { … }
void attachDebugInfo(GlobalVariable &GV, DISubprogram &SP) { … }
FunctionType *getCheckFunctionType(LLVMContext &Ctx) { … }
Function *createDefaultCheckFunction(Module &M, bool UseX86FastCall) { … }
}
bool runImpl(Module &M) { … }