From 26ab5772b058fcddabfecb6736a3b78c67bc1751 Mon Sep 17 00:00:00 2001 From: Teresa Johnson Date: Tue, 15 Mar 2016 00:04:37 +0000 Subject: [ThinLTO] Renaming of function index to module summary index (NFC) (Resubmitting after fixing missing file issue) With the changes in r263275, there are now more than just functions in the summary. Completed the renaming of data structures (started in r263275) to reflect the wider scope. In particular, changed the FunctionIndex* data structures to ModuleIndex*, and renamed related variables and comments. Also renamed the files to reflect the changes. A companion clang patch will immediately succeed this patch to reflect this renaming. llvm-svn: 263513 --- llvm/lib/Linker/LinkModules.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'llvm/lib/Linker') diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp index e3ad7bb7280..eee1bb3ebb4 100644 --- a/llvm/lib/Linker/LinkModules.cpp +++ b/llvm/lib/Linker/LinkModules.cpp @@ -35,15 +35,15 @@ class ModuleLinker { /// For symbol clashes, prefer those from Src. unsigned Flags; - /// Function index passed into ModuleLinker for using in function + /// Module summary index passed into ModuleLinker for using in function /// importing/exporting handling. - const FunctionInfoIndex *ImportIndex; + const ModuleSummaryIndex *ImportIndex; /// Functions to import from source module, all other functions are /// imported as declarations instead of definitions. DenseSet *FunctionsToImport; - /// Set to true if the given FunctionInfoIndex contains any functions + /// Set to true if the given ModuleSummaryIndex contains any functions /// from this source module, in which case we must conservatively assume /// that any of its functions may be imported into another module /// as part of a different backend compilation process. @@ -124,15 +124,15 @@ class ModuleLinker { public: ModuleLinker(IRMover &Mover, std::unique_ptr SrcM, unsigned Flags, - const FunctionInfoIndex *Index = nullptr, + const ModuleSummaryIndex *Index = nullptr, DenseSet *FunctionsToImport = nullptr, DenseMap *ValIDToTempMDMap = nullptr) : Mover(Mover), SrcM(std::move(SrcM)), Flags(Flags), ImportIndex(Index), FunctionsToImport(FunctionsToImport), ValIDToTempMDMap(ValIDToTempMDMap) { assert((ImportIndex || !FunctionsToImport) && - "Expect a FunctionInfoIndex when importing"); - // If we have a FunctionInfoIndex but no function to import, + "Expect a ModuleSummaryIndex when importing"); + // If we have a ModuleSummaryIndex but no function to import, // then this is the primary module being compiled in a ThinLTO // backend compilation, and we need to see if it has functions that // may be exported to another backend compilation. @@ -549,7 +549,7 @@ bool ModuleLinker::run() { Linker::Linker(Module &M) : Mover(M) {} bool Linker::linkInModule(std::unique_ptr Src, unsigned Flags, - const FunctionInfoIndex *Index, + const ModuleSummaryIndex *Index, DenseSet *FunctionsToImport, DenseMap *ValIDToTempMDMap) { ModuleLinker ModLinker(Mover, std::move(Src), Flags, Index, FunctionsToImport, -- cgit v1.2.3