namespace {
struct ConstantMerge : public ModulePass {
static char ID; // Pass identification, replacement for typeid
- ConstantMerge() : ModulePass(&ID) {}
+ ConstantMerge() : ModulePass(ID) {}
// run - For this pass, process all of the globals in the module,
// eliminating duplicate constants.
}
char ConstantMerge::ID = 0;
-static RegisterPass<ConstantMerge>
-X("constmerge", "Merge Duplicate Global Constants");
+INITIALIZE_PASS(ConstantMerge, "constmerge",
+ "Merge Duplicate Global Constants", false, false);
ModulePass *llvm::createConstantMergePass() { return new ConstantMerge(); }