namespace {
struct VISIBILITY_HIDDEN GlobalDCE : public ModulePass {
+ static const int ID; // Pass identifcation, replacement for typeid
+ GlobalDCE() : ModulePass((intptr_t)&ID) {}
+
// run - Do the GlobalDCE pass on the specified module, optionally updating
// the specified callgraph to reflect the changes.
//
bool SafeToDestroyConstant(Constant* C);
bool RemoveUnusedGlobalValue(GlobalValue &GV);
};
+ const int GlobalDCE::ID = 0;
RegisterPass<GlobalDCE> X("globaldce", "Dead Global Elimination");
}