aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp')
-rw-r--r--llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp22
1 files changed, 2 insertions, 20 deletions
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<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(