23#define DEBUG_TYPE "strip-dead-prototypes"
25STATISTIC(NumDeadPrototypes,
"Number of dead prototypes removed");
28 bool MadeChange =
false;
33 if (
F.isDeclaration() &&
F.use_empty()) {
43 if (GV.isDeclaration() && GV.use_empty())
Module.h This file contains the declarations for the Module class.
This file defines the 'Statistic' class, which is designed to be an easy way to expose various metric...
#define STATISTIC(VARNAME, DESC)
static bool stripDeadPrototypes(Module &M)
A container for analyses that lazily runs them and caches their results.
A Module instance is used to store all the information related to an LLVM module.
A set of analyses that are preserved following a run of a transformation pass.
static PreservedAnalyses none()
Convenience factory function for the empty preserved set.
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
This is an optimization pass for GlobalISel generic memory operations.
iterator_range< early_inc_iterator_impl< detail::IterOfRange< RangeT > > > make_early_inc_range(RangeT &&Range)
Make a range that does early increment to allow mutation of the underlying range without disrupting i...
PreservedAnalyses run(Module &M, ModuleAnalysisManager &)