diff options
| author | Eugene Zelenko <eugene.zelenko@gmail.com> | 2017-04-21 22:03:05 +0000 |
|---|---|---|
| committer | Eugene Zelenko <eugene.zelenko@gmail.com> | 2017-04-21 22:03:05 +0000 |
| commit | 9f5094df36b318be34426f9bbde07f6e0bb9fff2 (patch) | |
| tree | 8a5e941df3aa9778f2eaa909f4908e7d05730f38 /llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp | |
| parent | 342586d7281ecec046ae79facde7d7f604cba8ff (diff) | |
[Object] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 301049
Diffstat (limited to 'llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp')
| -rw-r--r-- | llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp b/llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp index de1ddab88fd4..91f93a41032e 100644 --- a/llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp +++ b/llvm/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); |
