[llvm] r253840 - Add const qualifier for FunctionInfoIndex in ModuleLinker and linkInModule() (NFC)

Mehdi Amini via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 22 17:59:17 PST 2015


Author: mehdi_amini
Date: Sun Nov 22 19:59:16 2015
New Revision: 253840

URL: http://llvm.org/viewvc/llvm-project?rev=253840&view=rev
Log:
Add const qualifier for FunctionInfoIndex in ModuleLinker and linkInModule() (NFC)

From: Mehdi Amini <mehdi.amini at apple.com>

Modified:
    llvm/trunk/include/llvm/Linker/Linker.h
    llvm/trunk/lib/Linker/LinkModules.cpp

Modified: llvm/trunk/include/llvm/Linker/Linker.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Linker/Linker.h?rev=253840&r1=253839&r2=253840&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Linker/Linker.h (original)
+++ llvm/trunk/include/llvm/Linker/Linker.h Sun Nov 22 19:59:16 2015
@@ -82,7 +82,7 @@ public:
   /// function is imported from the source module.
   /// Returns true on error.
   bool linkInModule(Module *Src, unsigned Flags = Flags::None,
-                    FunctionInfoIndex *Index = nullptr,
+                    const FunctionInfoIndex *Index = nullptr,
                     Function *FuncToImport = nullptr);
 
   /// \brief Set the composite to the passed-in module.

Modified: llvm/trunk/lib/Linker/LinkModules.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/LinkModules.cpp?rev=253840&r1=253839&r2=253840&view=diff
==============================================================================
--- llvm/trunk/lib/Linker/LinkModules.cpp (original)
+++ llvm/trunk/lib/Linker/LinkModules.cpp Sun Nov 22 19:59:16 2015
@@ -428,7 +428,7 @@ class ModuleLinker {
 
   /// Function index passed into ModuleLinker for using in function
   /// importing/exporting handling.
-  FunctionInfoIndex *ImportIndex;
+  const FunctionInfoIndex *ImportIndex;
 
   /// Function to import from source module, all other functions are
   /// imported as declarations instead of definitions.
@@ -448,7 +448,7 @@ class ModuleLinker {
 public:
   ModuleLinker(Module *dstM, Linker::IdentifiedStructTypeSet &Set, Module *srcM,
                DiagnosticHandlerFunction DiagnosticHandler, unsigned Flags,
-               FunctionInfoIndex *Index = nullptr,
+               const FunctionInfoIndex *Index = nullptr,
                Function *FuncToImport = nullptr)
       : DstM(dstM), SrcM(srcM), TypeMap(Set),
         ValMaterializer(TypeMap, DstM, LazilyLinkGlobalValues, this),
@@ -2088,7 +2088,8 @@ void Linker::deleteModule() {
   Composite = nullptr;
 }
 
-bool Linker::linkInModule(Module *Src, unsigned Flags, FunctionInfoIndex *Index,
+bool Linker::linkInModule(Module *Src, unsigned Flags,
+                          const FunctionInfoIndex *Index,
                           Function *FuncToImport) {
   ModuleLinker TheLinker(Composite, IdentifiedStructTypes, Src,
                          DiagnosticHandler, Flags, Index, FuncToImport);




More information about the llvm-commits mailing list