FunctionIndex is not optional for renameModuleForThinLTO(), make it a reference (NFC)

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 262976
diff --git a/llvm/lib/Transforms/IPO/FunctionImport.cpp b/llvm/lib/Transforms/IPO/FunctionImport.cpp
index 89f3f9d..6589f56 100644
--- a/llvm/lib/Transforms/IPO/FunctionImport.cpp
+++ b/llvm/lib/Transforms/IPO/FunctionImport.cpp
@@ -436,7 +436,7 @@
 
     // First we need to promote to global scope and rename any local values that
     // are potentially exported to other modules.
-    if (renameModuleForThinLTO(M, Index)) {
+    if (renameModuleForThinLTO(M, *Index)) {
       errs() << "Error renaming module\n";
       return false;
     }
diff --git a/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp b/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp
index b114ad0..73069b2 100644
--- a/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp
+++ b/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp
@@ -90,7 +90,7 @@
       (doPromoteLocalToGlobal(SGV) || isPerformingImport()))
     return FunctionInfoIndex::getGlobalNameForLocal(
         SGV->getName(),
-        ImportIndex->getModuleId(SGV->getParent()->getModuleIdentifier()));
+        ImportIndex.getModuleId(SGV->getParent()->getModuleIdentifier()));
   return SGV->getName();
 }
 
@@ -231,7 +231,7 @@
   return false;
 }
 
-bool llvm::renameModuleForThinLTO(Module &M, const FunctionInfoIndex *Index) {
+bool llvm::renameModuleForThinLTO(Module &M, const FunctionInfoIndex &Index) {
   FunctionImportGlobalProcessing ThinLTOProcessing(M, Index);
   return ThinLTOProcessing.run();
 }