mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
39 lines
1.2 KiB
C++
39 lines
1.2 KiB
C++
#pragma once
|
|
|
|
//
|
|
// This file is distributed under the MIT License. See LICENSE.md for details.
|
|
//
|
|
|
|
#include "llvm/Pass.h"
|
|
|
|
#include "revng/BasicAnalyses/GeneratedCodeBasicInfo.h"
|
|
#include "revng/EarlyFunctionAnalysis/ControlFlowGraphCache.h"
|
|
#include "revng/Model/Binary.h"
|
|
#include "revng/Model/LoadModelPass.h"
|
|
#include "revng/Support/IRHelpers.h"
|
|
#include "revng/Support/MetaAddress.h"
|
|
|
|
void collectFunctionsFromUnusedAddresses(llvm::Module &M,
|
|
GeneratedCodeBasicInfo &GCBI,
|
|
model::Binary &Binary,
|
|
ControlFlowGraphCache &FMC);
|
|
|
|
class CollectFunctionsFromUnusedAddressesWrapperPass : public llvm::ModulePass {
|
|
public:
|
|
static char ID;
|
|
|
|
public:
|
|
CollectFunctionsFromUnusedAddressesWrapperPass() : llvm::ModulePass(ID) {}
|
|
void getAnalysisUsage(llvm::AnalysisUsage &AU) const override final;
|
|
|
|
public:
|
|
bool runOnModule(llvm::Module &M) override final;
|
|
};
|
|
|
|
class CollectFunctionsFromUnusedAddressesPass
|
|
: public llvm::PassInfoMixin<CollectFunctionsFromUnusedAddressesPass> {
|
|
public:
|
|
llvm::PreservedAnalyses run(llvm::Module &M,
|
|
llvm::ModuleAnalysisManager &MAM);
|
|
};
|