mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
99274f1a41
The GeneratedCodeBasicInfo class has been disentangled in order to create wrappers to support both the legacy and the new pass manager.
32 lines
794 B
C++
32 lines
794 B
C++
#pragma once
|
|
|
|
//
|
|
// This file is distributed under the MIT License. See LICENSE.md for details.
|
|
//
|
|
|
|
// LLVM includes
|
|
#include "llvm/IR/BasicBlock.h"
|
|
#include "llvm/IR/Function.h"
|
|
#include "llvm/IR/Instructions.h"
|
|
#include "llvm/Pass.h"
|
|
#include "llvm/Support/Casting.h"
|
|
|
|
// Local libraries includes
|
|
#include "revng/BasicAnalyses/GeneratedCodeBasicInfo.h"
|
|
#include "revng/FunctionCallIdentification/FunctionCallIdentification.h"
|
|
|
|
class PruneRetSuccessors : public llvm::ModulePass {
|
|
public:
|
|
static char ID;
|
|
|
|
public:
|
|
PruneRetSuccessors() : llvm::ModulePass(ID) {}
|
|
|
|
void getAnalysisUsage(llvm::AnalysisUsage &AU) const override {
|
|
AU.addRequired<GeneratedCodeBasicInfoWrapperPass>();
|
|
AU.addRequired<FunctionCallIdentification>();
|
|
}
|
|
|
|
bool runOnModule(llvm::Module &M) override;
|
|
};
|