23 #define DEBUG_TYPE "strip-dead-prototypes"
25 STATISTIC(NumDeadPrototypes,
"Number of dead prototypes removed");
30 class StripDeadPrototypesPass :
public ModulePass {
36 bool runOnModule(
Module &M)
override;
43 "Strip Unused Function Prototypes",
false,
false)
45 bool StripDeadPrototypesPass::runOnModule(
Module &M) {
46 bool MadeChange =
false;
73 return new StripDeadPrototypesPass();
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. ...
void eraseFromParent() override
eraseFromParent - This method unlinks 'this' from the containing module and deletes it...
INITIALIZE_PASS(StripDeadPrototypesPass,"strip-dead-prototypes","Strip Unused Function Prototypes", false, false) bool StripDeadPrototypesPass
Module.h This file contains the declarations for the Module class.
void eraseFromParent() override
eraseFromParent - This method unlinks 'this' from the containing module and deletes it...
bool isDeclaration() const
Return true if the primary definition of this global value is outside of the current translation unit...
void initializeStripDeadPrototypesPassPass(PassRegistry &)
ModulePass class - This class is used to implement unstructured interprocedural optimizations and ana...
ModulePass * createStripDeadPrototypesPass()
createStripDeadPrototypesPass - This pass removes any function declarations (prototypes) that are not...