Remove unused function parameter (NFC)
authorTeresa Johnson <tejohnson@google.com>
Mon, 23 Nov 2015 17:42:49 +0000 (17:42 +0000)
committerTeresa Johnson <tejohnson@google.com>
Mon, 23 Nov 2015 17:42:49 +0000 (17:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253889 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-link/llvm-link.cpp

index ada55c93a6e2d22025c4399ef6a70969e12144ea..9291e9b58628a081690251ba5e1f35b30c865dc9 100644 (file)
@@ -143,7 +143,7 @@ static void diagnosticHandler(const DiagnosticInfo &DI) {
 
 /// Load a function index if requested by the -functionindex option.
 static ErrorOr<std::unique_ptr<FunctionInfoIndex>>
-loadIndex(LLVMContext &Context, const Module *ExportingModule = nullptr) {
+loadIndex(const Module *ExportingModule = nullptr) {
   assert(!FunctionIndex.empty());
   ErrorOr<std::unique_ptr<MemoryBuffer>> FileOrErr =
       MemoryBuffer::getFileOrSTDIN(FunctionIndex);
@@ -208,8 +208,7 @@ static bool importFunctions(const char *argv0, LLVMContext &Context,
 
     std::unique_ptr<FunctionInfoIndex> Index;
     if (!FunctionIndex.empty()) {
-      ErrorOr<std::unique_ptr<FunctionInfoIndex>> IndexOrErr =
-          loadIndex(Context);
+      ErrorOr<std::unique_ptr<FunctionInfoIndex>> IndexOrErr = loadIndex();
       std::error_code EC = IndexOrErr.getError();
       if (EC) {
         errs() << EC.message() << '\n';
@@ -246,8 +245,7 @@ static bool linkFiles(const char *argv0, LLVMContext &Context, Linker &L,
     // local functions/variables as exported and promote if necessary.
     std::unique_ptr<FunctionInfoIndex> Index;
     if (!FunctionIndex.empty()) {
-      ErrorOr<std::unique_ptr<FunctionInfoIndex>> IndexOrErr =
-          loadIndex(Context, &*M);
+      ErrorOr<std::unique_ptr<FunctionInfoIndex>> IndexOrErr = loadIndex(&*M);
       std::error_code EC = IndexOrErr.getError();
       if (EC) {
         errs() << EC.message() << '\n';