diff options
author | Teresa Johnson <tejohnson@google.com> | 2016-04-22 01:52:00 +0000 |
---|---|---|
committer | Teresa Johnson <tejohnson@google.com> | 2016-04-22 01:52:00 +0000 |
commit | 6fb3f19959b39cb2f5cff276db55698464c59fa4 (patch) | |
tree | 844139b10b27dd14b76b6d193ef429d877a1fb08 /llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp | |
parent | adbab8638c8a28569601624aea8026352a029aef (diff) | |
download | bcm5719-llvm-6fb3f19959b39cb2f5cff276db55698464c59fa4.tar.gz bcm5719-llvm-6fb3f19959b39cb2f5cff276db55698464c59fa4.zip |
[ThinLTO] Remove unused/incomplete lazy summary reading support (NFC)
This removes the interfaces added (and not yet complete) to support
lazy reading of summaries. This support is not expected to be needed
since we are moving to a model where the full index is only being
traversed in the thin link step, instead of the back ends.
(The second part of this that I plan to do next is remove the
GlobalValueInfo from the ModuleSummaryIndex - it was mostly needed to
support lazy parsing of summaries. The index can instead reference the
summary structures directly.)
llvm-svn: 267097
Diffstat (limited to 'llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp')
-rw-r--r-- | llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp b/llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp index ca45144f05f..4af232b89f3 100644 --- a/llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp +++ b/llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp @@ -83,8 +83,7 @@ bool ModuleSummaryIndexObjectFile::hasGlobalValueSummaryInMemBuffer( // module summary/index. ErrorOr<std::unique_ptr<ModuleSummaryIndexObjectFile>> ModuleSummaryIndexObjectFile::create( - MemoryBufferRef Object, DiagnosticHandlerFunction DiagnosticHandler, - bool IsLazy) { + MemoryBufferRef Object, DiagnosticHandlerFunction DiagnosticHandler) { std::unique_ptr<ModuleSummaryIndex> Index; ErrorOr<MemoryBufferRef> BCOrErr = findBitcodeInMemBuffer(Object); @@ -92,7 +91,7 @@ ModuleSummaryIndexObjectFile::create( return BCOrErr.getError(); ErrorOr<std::unique_ptr<ModuleSummaryIndex>> IOrErr = - getModuleSummaryIndex(BCOrErr.get(), DiagnosticHandler, IsLazy); + getModuleSummaryIndex(BCOrErr.get(), DiagnosticHandler); if (std::error_code EC = IOrErr.getError()) return EC; @@ -103,23 +102,6 @@ ModuleSummaryIndexObjectFile::create( std::move(Index)); } -// Parse the summary information for value with the -// given name out of the given buffer. Parsed information is -// stored on the index object saved in this object. -std::error_code ModuleSummaryIndexObjectFile::findGlobalValueSummaryInMemBuffer( - MemoryBufferRef Object, DiagnosticHandlerFunction DiagnosticHandler, - StringRef ValueName) { - sys::fs::file_magic Type = sys::fs::identify_magic(Object.getBuffer()); - switch (Type) { - case sys::fs::file_magic::bitcode: { - return readGlobalValueSummary(Object, DiagnosticHandler, ValueName, - std::move(Index)); - } - default: - return object_error::invalid_file_type; - } -} - // Parse the module summary index out of an IR file and return the summary // index object if found, or nullptr if not. ErrorOr<std::unique_ptr<ModuleSummaryIndex>> llvm::getModuleSummaryIndexForFile( |