aboutsummaryrefslogtreecommitdiff
path: root/lib/Object/ModuleSummaryIndexObjectFile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Object/ModuleSummaryIndexObjectFile.cpp')
-rw-r--r--lib/Object/ModuleSummaryIndexObjectFile.cpp27
1 files changed, 18 insertions, 9 deletions
diff --git a/lib/Object/ModuleSummaryIndexObjectFile.cpp b/lib/Object/ModuleSummaryIndexObjectFile.cpp
index de1ddab88fd4..91f93a41032e 100644
--- a/lib/Object/ModuleSummaryIndexObjectFile.cpp
+++ b/lib/Object/ModuleSummaryIndexObjectFile.cpp
@@ -1,4 +1,4 @@
-//===- ModuleSummaryIndexObjectFile.cpp - Summary index file implementation ==//
+//==- ModuleSummaryIndexObjectFile.cpp - Summary index file implementation -==//
//
// The LLVM Compiler Infrastructure
//
@@ -11,29 +11,38 @@
//
//===----------------------------------------------------------------------===//
-#include "llvm/Object/ModuleSummaryIndexObjectFile.h"
#include "llvm/ADT/STLExtras.h"
+#include "llvm/ADT/StringRef.h"
#include "llvm/Bitcode/BitcodeReader.h"
#include "llvm/IR/ModuleSummaryIndex.h"
-#include "llvm/MC/MCStreamer.h"
+#include "llvm/Object/Binary.h"
+#include "llvm/Object/Error.h"
+#include "llvm/Object/ModuleSummaryIndexObjectFile.h"
#include "llvm/Object/ObjectFile.h"
+#include "llvm/Support/CommandLine.h"
+#include "llvm/Support/Error.h"
+#include "llvm/Support/ErrorOr.h"
+#include "llvm/Support/FileSystem.h"
#include "llvm/Support/MemoryBuffer.h"
-#include "llvm/Support/raw_ostream.h"
+#include <algorithm>
+#include <memory>
+#include <system_error>
+
using namespace llvm;
using namespace object;
-static llvm::cl::opt<bool> IgnoreEmptyThinLTOIndexFile(
- "ignore-empty-index-file", llvm::cl::ZeroOrMore,
- llvm::cl::desc(
+static cl::opt<bool> IgnoreEmptyThinLTOIndexFile(
+ "ignore-empty-index-file", cl::ZeroOrMore,
+ cl::desc(
"Ignore an empty index file and perform non-ThinLTO compilation"),
- llvm::cl::init(false));
+ cl::init(false));
ModuleSummaryIndexObjectFile::ModuleSummaryIndexObjectFile(
MemoryBufferRef Object, std::unique_ptr<ModuleSummaryIndex> I)
: SymbolicFile(Binary::ID_ModuleSummaryIndex, Object), Index(std::move(I)) {
}
-ModuleSummaryIndexObjectFile::~ModuleSummaryIndexObjectFile() {}
+ModuleSummaryIndexObjectFile::~ModuleSummaryIndexObjectFile() = default;
std::unique_ptr<ModuleSummaryIndex> ModuleSummaryIndexObjectFile::takeIndex() {
return std::move(Index);