Revert r208025, which made buildbots unhappy for unknown reasons.
[oota-llvm.git] / lib / Transforms / IPO / GlobalDCE.cpp
index 9decddcff80d358d3139cbdd3c217b875822054e..03b17d5238631532f2c5fef8b53a1f2f6ce03fc2 100644 (file)
@@ -54,16 +54,16 @@ namespace {
 
     bool RemoveUnusedGlobalValue(GlobalValue &GV);
   };
-}
 
 /// Returns true if F contains only a single "ret" instruction.
-static bool isEmptyFunction(Function *F) {
+bool isEmptyFunction(void *Context, Function *F) {
   BasicBlock &Entry = F->getEntryBlock();
   if (Entry.size() != 1 || !isa<ReturnInst>(Entry.front()))
     return false;
   ReturnInst &RI = cast<ReturnInst>(Entry.front());
   return RI.getReturnValue() == NULL;
 }
+}
 
 char GlobalDCE::ID = 0;
 INITIALIZE_PASS(GlobalDCE, "globaldce",
@@ -75,7 +75,7 @@ bool GlobalDCE::runOnModule(Module &M) {
   bool Changed = false;
 
   // Remove empty functions from the global ctors list.
-  Changed |= optimizeGlobalCtorsList(M, isEmptyFunction);
+  Changed |= optimizeGlobalCtorsList(M, isEmptyFunction, nullptr);
 
   // Loop over the module, adding globals which are obviously necessary.
   for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) {