#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/InitializePasses.h"
#include "llvm/Target/TargetLoweringObjectFile.h"
#include "llvm/Target/TargetMachine.h"
#include <cassert>
usingnamespacellvm;
usingnamespacellvm::dwarf;
MachineModuleInfoImpl::~MachineModuleInfoImpl() = default;
void MachineModuleInfo::initialize() { … }
void MachineModuleInfo::finalize() { … }
MachineModuleInfo::MachineModuleInfo(MachineModuleInfo &&MMI)
: … { … }
MachineModuleInfo::MachineModuleInfo(const LLVMTargetMachine *TM)
: … { … }
MachineModuleInfo::MachineModuleInfo(const LLVMTargetMachine *TM,
MCContext *ExtContext)
: … { … }
MachineModuleInfo::~MachineModuleInfo() { … }
MachineFunction *
MachineModuleInfo::getMachineFunction(const Function &F) const { … }
MachineFunction &MachineModuleInfo::getOrCreateMachineFunction(Function &F) { … }
void MachineModuleInfo::deleteMachineFunctionFor(Function &F) { … }
void MachineModuleInfo::insertFunction(const Function &F,
std::unique_ptr<MachineFunction> &&MF) { … }
namespace {
class FreeMachineFunction : public FunctionPass { … };
}
char FreeMachineFunction::ID;
FunctionPass *llvm::createFreeMachineFunctionPass() { … }
MachineModuleInfoWrapperPass::MachineModuleInfoWrapperPass(
const LLVMTargetMachine *TM)
: … { … }
MachineModuleInfoWrapperPass::MachineModuleInfoWrapperPass(
const LLVMTargetMachine *TM, MCContext *ExtContext)
: … { … }
INITIALIZE_PASS(…)
char MachineModuleInfoWrapperPass::ID = …;
static uint64_t getLocCookie(const SMDiagnostic &SMD, const SourceMgr &SrcMgr,
std::vector<const MDNode *> &LocInfos) { … }
bool MachineModuleInfoWrapperPass::doInitialization(Module &M) { … }
bool MachineModuleInfoWrapperPass::doFinalization(Module &M) { … }
AnalysisKey MachineModuleAnalysis::Key;
MachineModuleAnalysis::Result
MachineModuleAnalysis::run(Module &M, ModuleAnalysisManager &) { … }