diff options
author | Teresa Johnson <tejohnson@google.com> | 2016-03-14 21:18:10 +0000 |
---|---|---|
committer | Teresa Johnson <tejohnson@google.com> | 2016-03-14 21:18:10 +0000 |
commit | c37b05528e192dbfed3b6bbb385f23af2060ec9e (patch) | |
tree | 4dc754c4cce0d814f9eb637bb57097e21d69d41a /tools/llvm-lto | |
parent | 256128f217d644049069a5f72477fa77da81e52e (diff) |
Revert "[ThinLTO] Renaming of function index to module summary index (NFC)"
This reverts commit r263490. Missed a file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263493 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-lto')
-rw-r--r-- | tools/llvm-lto/llvm-lto.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/tools/llvm-lto/llvm-lto.cpp b/tools/llvm-lto/llvm-lto.cpp index 8aadc406f99..f2419949d4a 100644 --- a/tools/llvm-lto/llvm-lto.cpp +++ b/tools/llvm-lto/llvm-lto.cpp @@ -19,9 +19,9 @@ #include "llvm/IR/LLVMContext.h" #include "llvm/IRReader/IRReader.h" #include "llvm/LTO/LTOCodeGenerator.h" -#include "llvm/LTO/LTOModule.h" #include "llvm/LTO/ThinLTOCodeGenerator.h" -#include "llvm/Object/ModuleSummaryIndexObjectFile.h" +#include "llvm/LTO/LTOModule.h" +#include "llvm/Object/FunctionIndexObjectFile.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/ManagedStatic.h" @@ -251,16 +251,16 @@ static void listSymbols(const TargetOptions &Options) { /// /// This is meant to enable testing of ThinLTO combined index generation, /// currently available via the gold plugin via -thinlto. -static void createCombinedModuleSummaryIndex() { - ModuleSummaryIndex CombinedIndex; +static void createCombinedFunctionIndex() { + FunctionInfoIndex CombinedIndex; uint64_t NextModuleId = 0; for (auto &Filename : InputFilenames) { CurrentActivity = "loading file '" + Filename + "'"; - ErrorOr<std::unique_ptr<ModuleSummaryIndex>> IndexOrErr = - llvm::getModuleSummaryIndexForFile(Filename, diagnosticHandler); - std::unique_ptr<ModuleSummaryIndex> Index = std::move(IndexOrErr.get()); + ErrorOr<std::unique_ptr<FunctionInfoIndex>> IndexOrErr = + llvm::getFunctionIndexForFile(Filename, diagnosticHandler); + std::unique_ptr<FunctionInfoIndex> Index = std::move(IndexOrErr.get()); CurrentActivity = ""; - // Skip files without a module summary. + // Skip files without a function summary. if (!Index) continue; CombinedIndex.mergeFrom(std::move(Index), ++NextModuleId); @@ -277,7 +277,7 @@ static void createCombinedModuleSummaryIndex() { namespace thinlto { std::vector<std::unique_ptr<MemoryBuffer>> -loadAllFilesForIndex(const ModuleSummaryIndex &Index) { +loadAllFilesForIndex(const FunctionInfoIndex &Index) { std::vector<std::unique_ptr<MemoryBuffer>> InputBuffers; for (auto &ModPath : Index.modPathStringEntries()) { @@ -290,12 +290,12 @@ loadAllFilesForIndex(const ModuleSummaryIndex &Index) { return InputBuffers; } -std::unique_ptr<ModuleSummaryIndex> loadCombinedIndex() { +std::unique_ptr<FunctionInfoIndex> loadCombinedIndex() { if (ThinLTOIndex.empty()) report_fatal_error("Missing -thinlto-index for ThinLTO promotion stage"); auto CurrentActivity = "loading file '" + ThinLTOIndex + "'"; - ErrorOr<std::unique_ptr<ModuleSummaryIndex>> IndexOrErr = - llvm::getModuleSummaryIndexForFile(ThinLTOIndex, diagnosticHandler); + ErrorOr<std::unique_ptr<FunctionInfoIndex>> IndexOrErr = + llvm::getFunctionIndexForFile(ThinLTOIndex, diagnosticHandler); error(IndexOrErr, "error " + CurrentActivity); return std::move(IndexOrErr.get()); } @@ -557,7 +557,7 @@ int main(int argc, char **argv) { } if (ThinLTO) { - createCombinedModuleSummaryIndex(); + createCombinedFunctionIndex(); return 0; } |