diff options
author | Teresa Johnson <tejohnson@google.com> | 2016-03-15 00:04:37 +0000 |
---|---|---|
committer | Teresa Johnson <tejohnson@google.com> | 2016-03-15 00:04:37 +0000 |
commit | 26ab5772b058fcddabfecb6736a3b78c67bc1751 (patch) | |
tree | 89b82d60f6e4ef3d7970cf1dc620c4f3a78bad2e /llvm/lib/Linker | |
parent | da8b3f1914e0cc4eb25af376583a23e660718115 (diff) | |
download | bcm5719-llvm-26ab5772b058fcddabfecb6736a3b78c67bc1751.tar.gz bcm5719-llvm-26ab5772b058fcddabfecb6736a3b78c67bc1751.zip |
[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
Diffstat (limited to 'llvm/lib/Linker')
-rw-r--r-- | llvm/lib/Linker/LinkModules.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
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<const GlobalValue *> *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<Module> SrcM, unsigned Flags, - const FunctionInfoIndex *Index = nullptr, + const ModuleSummaryIndex *Index = nullptr, DenseSet<const GlobalValue *> *FunctionsToImport = nullptr, DenseMap<unsigned, MDNode *> *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<Module> Src, unsigned Flags, - const FunctionInfoIndex *Index, + const ModuleSummaryIndex *Index, DenseSet<const GlobalValue *> *FunctionsToImport, DenseMap<unsigned, MDNode *> *ValIDToTempMDMap) { ModuleLinker ModLinker(Mover, std::move(Src), Flags, Index, FunctionsToImport, |