mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
0c671ea7ae
RemoveExceptionalCalls is a simple pass whose goal is to drop all the calls to functions marked as `Exceptional` and replace them with an `UnrechableInst`. This is mainly useful in the decompilation pipeline.
22 lines
416 B
C++
22 lines
416 B
C++
#pragma once
|
|
|
|
//
|
|
// This file is distributed under the MIT License. See LICENSE.md for details.
|
|
//
|
|
|
|
#include "llvm/Pass.h"
|
|
|
|
class RemoveExceptionalCalls : public llvm::ModulePass {
|
|
public:
|
|
static char ID;
|
|
|
|
public:
|
|
RemoveExceptionalCalls() : llvm::ModulePass(ID) {}
|
|
|
|
void getAnalysisUsage(llvm::AnalysisUsage &AU) const override {
|
|
AU.setPreservesAll();
|
|
}
|
|
|
|
bool runOnModule(llvm::Module &F) override;
|
|
};
|