From 6fb3f19959b39cb2f5cff276db55698464c59fa4 Mon Sep 17 00:00:00 2001 From: Teresa Johnson Date: Fri, 22 Apr 2016 01:52:00 +0000 Subject: [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 --- llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) (limited to 'llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp') diff --git a/llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp b/llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp index ca45144..4af232b 100644 --- a/llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp +++ b/llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp @@ -83,8 +83,7 @@ bool ModuleSummaryIndexObjectFile::hasGlobalValueSummaryInMemBuffer( // module summary/index. ErrorOr> ModuleSummaryIndexObjectFile::create( - MemoryBufferRef Object, DiagnosticHandlerFunction DiagnosticHandler, - bool IsLazy) { + MemoryBufferRef Object, DiagnosticHandlerFunction DiagnosticHandler) { std::unique_ptr Index; ErrorOr BCOrErr = findBitcodeInMemBuffer(Object); @@ -92,7 +91,7 @@ ModuleSummaryIndexObjectFile::create( return BCOrErr.getError(); ErrorOr> 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> llvm::getModuleSummaryIndexForFile( -- cgit v1.1