diff options
author | Eugene Zelenko <eugene.zelenko@gmail.com> | 2016-11-23 23:16:32 +0000 |
---|---|---|
committer | Eugene Zelenko <eugene.zelenko@gmail.com> | 2016-11-23 23:16:32 +0000 |
commit | 570e39a25ca345e3facaea16b2facefddfb3aa92 (patch) | |
tree | 04b12c1516d05fbbcd6883f4579a9a62eb8d45be /llvm/lib/DebugInfo/PDB/Raw/NameMap.cpp | |
parent | bf9523f549cc28c9c9836fa9442db86ba4657433 (diff) | |
download | bcm5719-llvm-570e39a25ca345e3facaea16b2facefddfb3aa92.tar.gz bcm5719-llvm-570e39a25ca345e3facaea16b2facefddfb3aa92.zip |
[DebugInfo] Fix some Clang-tidy modernize-use-default and Include What You Use warnings; other minor fixes (NFC).
Per Zachary Turner and Mehdi Amini suggestion to make only post-commit reviews.
llvm-svn: 287838
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Raw/NameMap.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/PDB/Raw/NameMap.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Raw/NameMap.cpp b/llvm/lib/DebugInfo/PDB/Raw/NameMap.cpp index 40992e9a96e..0f55f58da38 100644 --- a/llvm/lib/DebugInfo/PDB/Raw/NameMap.cpp +++ b/llvm/lib/DebugInfo/PDB/Raw/NameMap.cpp @@ -7,20 +7,24 @@ // //===----------------------------------------------------------------------===// -#include "llvm/DebugInfo/PDB/Raw/NameMap.h" #include "llvm/ADT/SparseBitVector.h" +#include "llvm/ADT/StringMap.h" +#include "llvm/ADT/StringRef.h" +#include "llvm/ADT/iterator_range.h" #include "llvm/DebugInfo/MSF/StreamReader.h" -#include "llvm/DebugInfo/MSF/StreamWriter.h" +#include "llvm/DebugInfo/PDB/Raw/NameMap.h" #include "llvm/DebugInfo/PDB/Raw/RawError.h" +#include "llvm/Support/Error.h" +#include <algorithm> +#include <cstdint> using namespace llvm; using namespace llvm::msf; using namespace llvm::pdb; -NameMap::NameMap() {} +NameMap::NameMap() = default; Error NameMap::load(StreamReader &Stream) { - // This is some sort of weird string-set/hash table encoded in the stream. // It starts with the number of bytes in the table. uint32_t NumberOfBytes; @@ -146,8 +150,8 @@ Error NameMap::load(StreamReader &Stream) { } iterator_range<StringMapConstIterator<uint32_t>> NameMap::entries() const { - return llvm::make_range<StringMapConstIterator<uint32_t>>(Mapping.begin(), - Mapping.end()); + return make_range<StringMapConstIterator<uint32_t>>(Mapping.begin(), + Mapping.end()); } bool NameMap::tryGetValue(StringRef Name, uint32_t &Value) const { |