25 #define DEBUG_TYPE "strip-dead-prototypes"
27 STATISTIC(NumDeadPrototypes,
"Number of dead prototypes removed");
30 bool MadeChange =
false;
65 class StripDeadPrototypesLegacyPass :
public ModulePass {
72 bool runOnModule(
Module &M)
override {
84 "Strip Unused Function Prototypes",
false,
false)
87 return new StripDeadPrototypesLegacyPass();
ModulePass * createStripDeadPrototypesPass()
createStripDeadPrototypesPass - This pass removes any function declarations (prototypes) that are not...
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
STATISTIC(NumFunctions,"Total number of functions")
A Module instance is used to store all the information related to an LLVM module. ...
INITIALIZE_PASS(StripDeadPrototypesLegacyPass,"strip-dead-prototypes","Strip Unused Function Prototypes", false, false) ModulePass *llvm
global_iterator global_begin()
static bool stripDeadPrototypes(Module &M)
static PreservedAnalyses none()
Convenience factory function for the empty preserved set.
A set of analyses that are preserved following a run of a transformation pass.
void eraseFromParent()
eraseFromParent - This method unlinks 'this' from the containing module and deletes it...
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
global_iterator global_end()
Iterator for intrusive lists based on ilist_node.
Module.h This file contains the declarations for the Module class.
PreservedAnalyses run(Module &M, ModuleAnalysisManager &)
bool isDeclaration() const
Return true if the primary definition of this global value is outside of the current translation unit...
ModulePass class - This class is used to implement unstructured interprocedural optimizations and ana...
void eraseFromParent()
eraseFromParent - This method unlinks 'this' from the containing module and deletes it...
A container for analyses that lazily runs them and caches their results.
void initializeStripDeadPrototypesLegacyPassPass(PassRegistry &)