From 9129f5b21af9b902b01400e7c8f659cd0d2a9d7d Mon Sep 17 00:00:00 2001 From: Adrian McCarthy Date: Wed, 25 Jan 2017 22:38:55 +0000 Subject: [PATCH] NFC: Rename (PDB) RawSession to NativeSession This eliminates one overload on the term Raw. Differential Revision: https://reviews.llvm.org/D29098 llvm-svn: 293104 --- .../DebugInfo/PDB/{Raw => Native}/DbiStream.h | 8 +- .../PDB/{Raw => Native}/DbiStreamBuilder.h | 7 +- .../PDB/{Raw => Native}/EnumTables.h | 0 .../PDB/{Raw => Native}/GlobalsStream.h | 4 +- .../llvm/DebugInfo/PDB/{Raw => Native}/Hash.h | 0 .../DebugInfo/PDB/{Raw => Native}/HashTable.h | 0 .../{Raw => Native}/ISectionContribVisitor.h | 0 .../PDB/{Raw => Native}/InfoStream.h | 4 +- .../PDB/{Raw => Native}/InfoStreamBuilder.h | 6 +- .../DebugInfo/PDB/{Raw => Native}/ModInfo.h | 2 +- .../DebugInfo/PDB/{Raw => Native}/ModStream.h | 0 .../PDB/{Raw => Native}/NamedStreamMap.h | 2 +- .../RawSession.h => Native/NativeSession.h} | 10 +-- .../DebugInfo/PDB/{Raw => Native}/PDBFile.h | 9 ++- .../PDB/{Raw => Native}/PDBFileBuilder.h | 8 +- .../PDB/{Raw => Native}/PublicsStream.h | 4 +- .../PDB/{Raw => Native}/RawConstants.h | 0 .../DebugInfo/PDB/{Raw => Native}/RawError.h | 0 .../DebugInfo/PDB/{Raw => Native}/RawTypes.h | 0 .../PDB/{Raw => Native}/StringTable.h | 0 .../PDB/{Raw => Native}/StringTableBuilder.h | 0 .../PDB/{Raw => Native}/SymbolStream.h | 0 .../PDB/{Raw => Native}/TpiHashing.h | 2 +- .../DebugInfo/PDB/{Raw => Native}/TpiStream.h | 6 +- .../PDB/{Raw => Native}/TpiStreamBuilder.h | 2 +- include/llvm/DebugInfo/PDB/PDBTypes.h | 2 +- lib/DebugInfo/PDB/CMakeLists.txt | 50 ++++++------ .../PDB/{Raw => Native}/DbiStream.cpp | 23 +++--- .../PDB/{Raw => Native}/DbiStreamBuilder.cpp | 6 +- .../PDB/{Raw => Native}/EnumTables.cpp | 4 +- lib/DebugInfo/PDB/{Raw => Native}/GSI.cpp | 4 +- lib/DebugInfo/PDB/{Raw => Native}/GSI.h | 2 +- .../PDB/{Raw => Native}/GlobalsStream.cpp | 2 +- lib/DebugInfo/PDB/{Raw => Native}/Hash.cpp | 2 +- .../PDB/{Raw => Native}/HashTable.cpp | 4 +- .../PDB/{Raw => Native}/InfoStream.cpp | 10 +-- .../PDB/{Raw => Native}/InfoStreamBuilder.cpp | 12 +-- lib/DebugInfo/PDB/{Raw => Native}/ModInfo.cpp | 4 +- .../PDB/{Raw => Native}/ModStream.cpp | 10 +-- .../PDB/{Raw => Native}/NamedStreamMap.cpp | 6 +- .../NativeSession.cpp} | 77 ++++++++++--------- lib/DebugInfo/PDB/{Raw => Native}/PDBFile.cpp | 61 +++++++++------ .../PDB/{Raw => Native}/PDBFileBuilder.cpp | 18 ++--- .../PDB/{Raw => Native}/PublicsStream.cpp | 8 +- .../PDB/{Raw => Native}/RawError.cpp | 2 +- .../PDB/{Raw => Native}/StringTable.cpp | 8 +- .../{Raw => Native}/StringTableBuilder.cpp | 6 +- .../PDB/{Raw => Native}/SymbolStream.cpp | 8 +- .../PDB/{Raw => Native}/TpiHashing.cpp | 6 +- .../PDB/{Raw => Native}/TpiStream.cpp | 21 +++-- .../PDB/{Raw => Native}/TpiStreamBuilder.cpp | 10 +-- lib/DebugInfo/PDB/PDB.cpp | 6 +- tools/llvm-pdbdump/LLVMOutputStyle.cpp | 22 +++--- tools/llvm-pdbdump/PdbYaml.cpp | 4 +- tools/llvm-pdbdump/PdbYaml.h | 4 +- tools/llvm-pdbdump/YAMLOutputStyle.cpp | 12 +-- tools/llvm-pdbdump/YamlTypeDumper.cpp | 2 +- tools/llvm-pdbdump/llvm-pdbdump.cpp | 28 +++---- 58 files changed, 265 insertions(+), 253 deletions(-) rename include/llvm/DebugInfo/PDB/{Raw => Native}/DbiStream.h (94%) rename include/llvm/DebugInfo/PDB/{Raw => Native}/DbiStreamBuilder.h (94%) rename include/llvm/DebugInfo/PDB/{Raw => Native}/EnumTables.h (100%) rename include/llvm/DebugInfo/PDB/{Raw => Native}/GlobalsStream.h (92%) rename include/llvm/DebugInfo/PDB/{Raw => Native}/Hash.h (100%) rename include/llvm/DebugInfo/PDB/{Raw => Native}/HashTable.h (100%) rename include/llvm/DebugInfo/PDB/{Raw => Native}/ISectionContribVisitor.h (100%) rename include/llvm/DebugInfo/PDB/{Raw => Native}/InfoStream.h (94%) rename include/llvm/DebugInfo/PDB/{Raw => Native}/InfoStreamBuilder.h (89%) rename include/llvm/DebugInfo/PDB/{Raw => Native}/ModInfo.h (97%) rename include/llvm/DebugInfo/PDB/{Raw => Native}/ModStream.h (100%) rename include/llvm/DebugInfo/PDB/{Raw => Native}/NamedStreamMap.h (96%) rename include/llvm/DebugInfo/PDB/{Raw/RawSession.h => Native/NativeSession.h} (91%) rename include/llvm/DebugInfo/PDB/{Raw => Native}/PDBFile.h (94%) rename include/llvm/DebugInfo/PDB/{Raw => Native}/PDBFileBuilder.h (89%) rename include/llvm/DebugInfo/PDB/{Raw => Native}/PublicsStream.h (95%) rename include/llvm/DebugInfo/PDB/{Raw => Native}/RawConstants.h (100%) rename include/llvm/DebugInfo/PDB/{Raw => Native}/RawError.h (100%) rename include/llvm/DebugInfo/PDB/{Raw => Native}/RawTypes.h (100%) rename include/llvm/DebugInfo/PDB/{Raw => Native}/StringTable.h (100%) rename include/llvm/DebugInfo/PDB/{Raw => Native}/StringTableBuilder.h (100%) rename include/llvm/DebugInfo/PDB/{Raw => Native}/SymbolStream.h (100%) rename include/llvm/DebugInfo/PDB/{Raw => Native}/TpiHashing.h (98%) rename include/llvm/DebugInfo/PDB/{Raw => Native}/TpiStream.h (92%) rename include/llvm/DebugInfo/PDB/{Raw => Native}/TpiStreamBuilder.h (97%) rename lib/DebugInfo/PDB/{Raw => Native}/DbiStream.cpp (96%) rename lib/DebugInfo/PDB/{Raw => Native}/DbiStreamBuilder.cpp (98%) rename lib/DebugInfo/PDB/{Raw => Native}/EnumTables.cpp (92%) rename lib/DebugInfo/PDB/{Raw => Native}/GSI.cpp (97%) rename lib/DebugInfo/PDB/{Raw => Native}/GSI.h (97%) rename lib/DebugInfo/PDB/{Raw => Native}/GlobalsStream.cpp (95%) rename lib/DebugInfo/PDB/{Raw => Native}/Hash.cpp (98%) rename lib/DebugInfo/PDB/{Raw => Native}/HashTable.cpp (98%) rename lib/DebugInfo/PDB/{Raw => Native}/InfoStream.cpp (89%) rename lib/DebugInfo/PDB/{Raw => Native}/InfoStreamBuilder.cpp (84%) rename lib/DebugInfo/PDB/{Raw => Native}/ModInfo.cpp (95%) rename lib/DebugInfo/PDB/{Raw => Native}/ModStream.cpp (91%) rename lib/DebugInfo/PDB/{Raw => Native}/NamedStreamMap.cpp (96%) rename lib/DebugInfo/PDB/{Raw/RawSession.cpp => Native/NativeSession.cpp} (50%) rename lib/DebugInfo/PDB/{Raw => Native}/PDBFile.cpp (91%) rename lib/DebugInfo/PDB/{Raw => Native}/PDBFileBuilder.cpp (90%) rename lib/DebugInfo/PDB/{Raw => Native}/PublicsStream.cpp (95%) rename lib/DebugInfo/PDB/{Raw => Native}/RawError.cpp (98%) rename lib/DebugInfo/PDB/{Raw => Native}/StringTable.cpp (94%) rename lib/DebugInfo/PDB/{Raw => Native}/StringTableBuilder.cpp (95%) rename lib/DebugInfo/PDB/{Raw => Native}/SymbolStream.cpp (86%) rename lib/DebugInfo/PDB/{Raw => Native}/TpiHashing.cpp (96%) rename lib/DebugInfo/PDB/{Raw => Native}/TpiStream.cpp (91%) rename lib/DebugInfo/PDB/{Raw => Native}/TpiStreamBuilder.cpp (94%) diff --git a/include/llvm/DebugInfo/PDB/Raw/DbiStream.h b/include/llvm/DebugInfo/PDB/Native/DbiStream.h similarity index 94% rename from include/llvm/DebugInfo/PDB/Raw/DbiStream.h rename to include/llvm/DebugInfo/PDB/Native/DbiStream.h index 2228ca9e640..06e4515ba47 100644 --- a/include/llvm/DebugInfo/PDB/Raw/DbiStream.h +++ b/include/llvm/DebugInfo/PDB/Native/DbiStream.h @@ -14,11 +14,11 @@ #include "llvm/DebugInfo/MSF/MappedBlockStream.h" #include "llvm/DebugInfo/MSF/StreamArray.h" #include "llvm/DebugInfo/MSF/StreamRef.h" +#include "llvm/DebugInfo/PDB/Native/ModInfo.h" +#include "llvm/DebugInfo/PDB/Native/RawConstants.h" +#include "llvm/DebugInfo/PDB/Native/RawTypes.h" +#include "llvm/DebugInfo/PDB/Native/StringTable.h" #include "llvm/DebugInfo/PDB/PDBTypes.h" -#include "llvm/DebugInfo/PDB/Raw/ModInfo.h" -#include "llvm/DebugInfo/PDB/Raw/RawConstants.h" -#include "llvm/DebugInfo/PDB/Raw/RawTypes.h" -#include "llvm/DebugInfo/PDB/Raw/StringTable.h" #include "llvm/Support/Endian.h" #include "llvm/Support/Error.h" diff --git a/include/llvm/DebugInfo/PDB/Raw/DbiStreamBuilder.h b/include/llvm/DebugInfo/PDB/Native/DbiStreamBuilder.h similarity index 94% rename from include/llvm/DebugInfo/PDB/Raw/DbiStreamBuilder.h rename to include/llvm/DebugInfo/PDB/Native/DbiStreamBuilder.h index 99a3ac7fb1d..05af1ef06ed 100644 --- a/include/llvm/DebugInfo/PDB/Raw/DbiStreamBuilder.h +++ b/include/llvm/DebugInfo/PDB/Native/DbiStreamBuilder.h @@ -16,9 +16,9 @@ #include "llvm/DebugInfo/MSF/ByteStream.h" #include "llvm/DebugInfo/MSF/StreamReader.h" +#include "llvm/DebugInfo/PDB/Native/PDBFile.h" +#include "llvm/DebugInfo/PDB/Native/RawConstants.h" #include "llvm/DebugInfo/PDB/PDBTypes.h" -#include "llvm/DebugInfo/PDB/Raw/PDBFile.h" -#include "llvm/DebugInfo/PDB/Raw/RawConstants.h" #include "llvm/Support/Endian.h" namespace llvm { @@ -60,8 +60,7 @@ public: Error finalizeMsfLayout(); - Error commit(const msf::MSFLayout &Layout, - const msf::WritableStream &Buffer); + Error commit(const msf::MSFLayout &Layout, const msf::WritableStream &Buffer); // A helper function to create Section Contributions from COFF input // section headers. diff --git a/include/llvm/DebugInfo/PDB/Raw/EnumTables.h b/include/llvm/DebugInfo/PDB/Native/EnumTables.h similarity index 100% rename from include/llvm/DebugInfo/PDB/Raw/EnumTables.h rename to include/llvm/DebugInfo/PDB/Native/EnumTables.h diff --git a/include/llvm/DebugInfo/PDB/Raw/GlobalsStream.h b/include/llvm/DebugInfo/PDB/Native/GlobalsStream.h similarity index 92% rename from include/llvm/DebugInfo/PDB/Raw/GlobalsStream.h rename to include/llvm/DebugInfo/PDB/Native/GlobalsStream.h index 175f093cf53..06596cb020c 100644 --- a/include/llvm/DebugInfo/PDB/Raw/GlobalsStream.h +++ b/include/llvm/DebugInfo/PDB/Native/GlobalsStream.h @@ -12,9 +12,9 @@ #include "llvm/DebugInfo/MSF/MappedBlockStream.h" #include "llvm/DebugInfo/MSF/StreamArray.h" +#include "llvm/DebugInfo/PDB/Native/RawConstants.h" +#include "llvm/DebugInfo/PDB/Native/RawTypes.h" #include "llvm/DebugInfo/PDB/PDBTypes.h" -#include "llvm/DebugInfo/PDB/Raw/RawConstants.h" -#include "llvm/DebugInfo/PDB/Raw/RawTypes.h" #include "llvm/Support/Error.h" namespace llvm { diff --git a/include/llvm/DebugInfo/PDB/Raw/Hash.h b/include/llvm/DebugInfo/PDB/Native/Hash.h similarity index 100% rename from include/llvm/DebugInfo/PDB/Raw/Hash.h rename to include/llvm/DebugInfo/PDB/Native/Hash.h diff --git a/include/llvm/DebugInfo/PDB/Raw/HashTable.h b/include/llvm/DebugInfo/PDB/Native/HashTable.h similarity index 100% rename from include/llvm/DebugInfo/PDB/Raw/HashTable.h rename to include/llvm/DebugInfo/PDB/Native/HashTable.h diff --git a/include/llvm/DebugInfo/PDB/Raw/ISectionContribVisitor.h b/include/llvm/DebugInfo/PDB/Native/ISectionContribVisitor.h similarity index 100% rename from include/llvm/DebugInfo/PDB/Raw/ISectionContribVisitor.h rename to include/llvm/DebugInfo/PDB/Native/ISectionContribVisitor.h diff --git a/include/llvm/DebugInfo/PDB/Raw/InfoStream.h b/include/llvm/DebugInfo/PDB/Native/InfoStream.h similarity index 94% rename from include/llvm/DebugInfo/PDB/Raw/InfoStream.h rename to include/llvm/DebugInfo/PDB/Native/InfoStream.h index 99109adad1e..0b59d9e789d 100644 --- a/include/llvm/DebugInfo/PDB/Raw/InfoStream.h +++ b/include/llvm/DebugInfo/PDB/Native/InfoStream.h @@ -12,9 +12,9 @@ #include "llvm/ADT/StringMap.h" #include "llvm/DebugInfo/MSF/MappedBlockStream.h" +#include "llvm/DebugInfo/PDB/Native/NamedStreamMap.h" +#include "llvm/DebugInfo/PDB/Native/RawConstants.h" #include "llvm/DebugInfo/PDB/PDBTypes.h" -#include "llvm/DebugInfo/PDB/Raw/NamedStreamMap.h" -#include "llvm/DebugInfo/PDB/Raw/RawConstants.h" #include "llvm/Support/Endian.h" #include "llvm/Support/Error.h" diff --git a/include/llvm/DebugInfo/PDB/Raw/InfoStreamBuilder.h b/include/llvm/DebugInfo/PDB/Native/InfoStreamBuilder.h similarity index 89% rename from include/llvm/DebugInfo/PDB/Raw/InfoStreamBuilder.h rename to include/llvm/DebugInfo/PDB/Native/InfoStreamBuilder.h index 768de094e98..1b182bc65aa 100644 --- a/include/llvm/DebugInfo/PDB/Raw/InfoStreamBuilder.h +++ b/include/llvm/DebugInfo/PDB/Native/InfoStreamBuilder.h @@ -13,10 +13,10 @@ #include "llvm/ADT/Optional.h" #include "llvm/Support/Error.h" +#include "llvm/DebugInfo/PDB/Native/NamedStreamMap.h" +#include "llvm/DebugInfo/PDB/Native/PDBFile.h" +#include "llvm/DebugInfo/PDB/Native/RawConstants.h" #include "llvm/DebugInfo/PDB/PDBTypes.h" -#include "llvm/DebugInfo/PDB/Raw/NamedStreamMap.h" -#include "llvm/DebugInfo/PDB/Raw/PDBFile.h" -#include "llvm/DebugInfo/PDB/Raw/RawConstants.h" namespace llvm { namespace msf { diff --git a/include/llvm/DebugInfo/PDB/Raw/ModInfo.h b/include/llvm/DebugInfo/PDB/Native/ModInfo.h similarity index 97% rename from include/llvm/DebugInfo/PDB/Raw/ModInfo.h rename to include/llvm/DebugInfo/PDB/Native/ModInfo.h index bf5cf53b331..d81d4c20ed1 100644 --- a/include/llvm/DebugInfo/PDB/Raw/ModInfo.h +++ b/include/llvm/DebugInfo/PDB/Native/ModInfo.h @@ -13,7 +13,7 @@ #include "llvm/ADT/StringRef.h" #include "llvm/DebugInfo/MSF/StreamArray.h" #include "llvm/DebugInfo/MSF/StreamRef.h" -#include "llvm/DebugInfo/PDB/Raw/RawTypes.h" +#include "llvm/DebugInfo/PDB/Native/RawTypes.h" #include "llvm/Support/Error.h" #include #include diff --git a/include/llvm/DebugInfo/PDB/Raw/ModStream.h b/include/llvm/DebugInfo/PDB/Native/ModStream.h similarity index 100% rename from include/llvm/DebugInfo/PDB/Raw/ModStream.h rename to include/llvm/DebugInfo/PDB/Native/ModStream.h diff --git a/include/llvm/DebugInfo/PDB/Raw/NamedStreamMap.h b/include/llvm/DebugInfo/PDB/Native/NamedStreamMap.h similarity index 96% rename from include/llvm/DebugInfo/PDB/Raw/NamedStreamMap.h rename to include/llvm/DebugInfo/PDB/Native/NamedStreamMap.h index 18b828a4a43..c5cf76e7740 100644 --- a/include/llvm/DebugInfo/PDB/Raw/NamedStreamMap.h +++ b/include/llvm/DebugInfo/PDB/Native/NamedStreamMap.h @@ -12,7 +12,7 @@ #include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringRef.h" -#include "llvm/DebugInfo/PDB/Raw/HashTable.h" +#include "llvm/DebugInfo/PDB/Native/HashTable.h" #include "llvm/Support/Error.h" #include diff --git a/include/llvm/DebugInfo/PDB/Raw/RawSession.h b/include/llvm/DebugInfo/PDB/Native/NativeSession.h similarity index 91% rename from include/llvm/DebugInfo/PDB/Raw/RawSession.h rename to include/llvm/DebugInfo/PDB/Native/NativeSession.h index 5a6c469fcc8..e6da266f796 100644 --- a/include/llvm/DebugInfo/PDB/Raw/RawSession.h +++ b/include/llvm/DebugInfo/PDB/Native/NativeSession.h @@ -1,4 +1,4 @@ -//===- RawSession.h - Native implementation of IPDBSession ------*- C++ -*-===// +//===- NativeSession.h - Native implementation of IPDBSession ---*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -19,11 +19,11 @@ namespace llvm { namespace pdb { class PDBFile; -class RawSession : public IPDBSession { +class NativeSession : public IPDBSession { public: - RawSession(std::unique_ptr PdbFile, - std::unique_ptr Allocator); - ~RawSession() override; + NativeSession(std::unique_ptr PdbFile, + std::unique_ptr Allocator); + ~NativeSession() override; static Error createFromPdb(StringRef Path, std::unique_ptr &Session); diff --git a/include/llvm/DebugInfo/PDB/Raw/PDBFile.h b/include/llvm/DebugInfo/PDB/Native/PDBFile.h similarity index 94% rename from include/llvm/DebugInfo/PDB/Raw/PDBFile.h rename to include/llvm/DebugInfo/PDB/Native/PDBFile.h index 07c1dcfa87e..9fb0ccc87f1 100644 --- a/include/llvm/DebugInfo/PDB/Raw/PDBFile.h +++ b/include/llvm/DebugInfo/PDB/Native/PDBFile.h @@ -104,10 +104,11 @@ public: bool hasPDBTpiStream() const; bool hasStringTable(); - private: - Expected> safelyCreateIndexedStream( - const msf::MSFLayout &Layout, const msf::ReadableStream &MsfData, - uint32_t StreamIndex) const; +private: + Expected> + safelyCreateIndexedStream(const msf::MSFLayout &Layout, + const msf::ReadableStream &MsfData, + uint32_t StreamIndex) const; BumpPtrAllocator &Allocator; diff --git a/include/llvm/DebugInfo/PDB/Raw/PDBFileBuilder.h b/include/llvm/DebugInfo/PDB/Native/PDBFileBuilder.h similarity index 89% rename from include/llvm/DebugInfo/PDB/Raw/PDBFileBuilder.h rename to include/llvm/DebugInfo/PDB/Native/PDBFileBuilder.h index bc48b5494c4..3898af5afc9 100644 --- a/include/llvm/DebugInfo/PDB/Raw/PDBFileBuilder.h +++ b/include/llvm/DebugInfo/PDB/Native/PDBFileBuilder.h @@ -13,10 +13,10 @@ #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/BitVector.h" #include "llvm/ADT/Optional.h" -#include "llvm/DebugInfo/PDB/Raw/NamedStreamMap.h" -#include "llvm/DebugInfo/PDB/Raw/PDBFile.h" -#include "llvm/DebugInfo/PDB/Raw/RawConstants.h" -#include "llvm/DebugInfo/PDB/Raw/StringTableBuilder.h" +#include "llvm/DebugInfo/PDB/Native/NamedStreamMap.h" +#include "llvm/DebugInfo/PDB/Native/PDBFile.h" +#include "llvm/DebugInfo/PDB/Native/RawConstants.h" +#include "llvm/DebugInfo/PDB/Native/StringTableBuilder.h" #include "llvm/Support/Allocator.h" #include "llvm/Support/Endian.h" #include "llvm/Support/Error.h" diff --git a/include/llvm/DebugInfo/PDB/Raw/PublicsStream.h b/include/llvm/DebugInfo/PDB/Native/PublicsStream.h similarity index 95% rename from include/llvm/DebugInfo/PDB/Raw/PublicsStream.h rename to include/llvm/DebugInfo/PDB/Native/PublicsStream.h index 577f2986ff2..9adf04d11c0 100644 --- a/include/llvm/DebugInfo/PDB/Raw/PublicsStream.h +++ b/include/llvm/DebugInfo/PDB/Native/PublicsStream.h @@ -13,9 +13,9 @@ #include "llvm/DebugInfo/CodeView/SymbolRecord.h" #include "llvm/DebugInfo/MSF/MappedBlockStream.h" #include "llvm/DebugInfo/MSF/StreamArray.h" +#include "llvm/DebugInfo/PDB/Native/RawConstants.h" +#include "llvm/DebugInfo/PDB/Native/RawTypes.h" #include "llvm/DebugInfo/PDB/PDBTypes.h" -#include "llvm/DebugInfo/PDB/Raw/RawConstants.h" -#include "llvm/DebugInfo/PDB/Raw/RawTypes.h" #include "llvm/Support/Error.h" diff --git a/include/llvm/DebugInfo/PDB/Raw/RawConstants.h b/include/llvm/DebugInfo/PDB/Native/RawConstants.h similarity index 100% rename from include/llvm/DebugInfo/PDB/Raw/RawConstants.h rename to include/llvm/DebugInfo/PDB/Native/RawConstants.h diff --git a/include/llvm/DebugInfo/PDB/Raw/RawError.h b/include/llvm/DebugInfo/PDB/Native/RawError.h similarity index 100% rename from include/llvm/DebugInfo/PDB/Raw/RawError.h rename to include/llvm/DebugInfo/PDB/Native/RawError.h diff --git a/include/llvm/DebugInfo/PDB/Raw/RawTypes.h b/include/llvm/DebugInfo/PDB/Native/RawTypes.h similarity index 100% rename from include/llvm/DebugInfo/PDB/Raw/RawTypes.h rename to include/llvm/DebugInfo/PDB/Native/RawTypes.h diff --git a/include/llvm/DebugInfo/PDB/Raw/StringTable.h b/include/llvm/DebugInfo/PDB/Native/StringTable.h similarity index 100% rename from include/llvm/DebugInfo/PDB/Raw/StringTable.h rename to include/llvm/DebugInfo/PDB/Native/StringTable.h diff --git a/include/llvm/DebugInfo/PDB/Raw/StringTableBuilder.h b/include/llvm/DebugInfo/PDB/Native/StringTableBuilder.h similarity index 100% rename from include/llvm/DebugInfo/PDB/Raw/StringTableBuilder.h rename to include/llvm/DebugInfo/PDB/Native/StringTableBuilder.h diff --git a/include/llvm/DebugInfo/PDB/Raw/SymbolStream.h b/include/llvm/DebugInfo/PDB/Native/SymbolStream.h similarity index 100% rename from include/llvm/DebugInfo/PDB/Raw/SymbolStream.h rename to include/llvm/DebugInfo/PDB/Native/SymbolStream.h diff --git a/include/llvm/DebugInfo/PDB/Raw/TpiHashing.h b/include/llvm/DebugInfo/PDB/Native/TpiHashing.h similarity index 98% rename from include/llvm/DebugInfo/PDB/Raw/TpiHashing.h rename to include/llvm/DebugInfo/PDB/Native/TpiHashing.h index 67a4952fcdf..72d25190065 100644 --- a/include/llvm/DebugInfo/PDB/Raw/TpiHashing.h +++ b/include/llvm/DebugInfo/PDB/Native/TpiHashing.h @@ -16,7 +16,7 @@ #include "llvm/DebugInfo/CodeView/TypeRecord.h" #include "llvm/DebugInfo/CodeView/TypeVisitorCallbacks.h" #include "llvm/DebugInfo/MSF/StreamArray.h" -#include "llvm/DebugInfo/PDB/Raw/RawError.h" +#include "llvm/DebugInfo/PDB/Native/RawError.h" #include "llvm/Support/Endian.h" #include "llvm/Support/Error.h" #include diff --git a/include/llvm/DebugInfo/PDB/Raw/TpiStream.h b/include/llvm/DebugInfo/PDB/Native/TpiStream.h similarity index 92% rename from include/llvm/DebugInfo/PDB/Raw/TpiStream.h rename to include/llvm/DebugInfo/PDB/Native/TpiStream.h index dc99a3e72de..b9368a7ef25 100644 --- a/include/llvm/DebugInfo/PDB/Raw/TpiStream.h +++ b/include/llvm/DebugInfo/PDB/Native/TpiStream.h @@ -12,10 +12,10 @@ #include "llvm/DebugInfo/CodeView/TypeRecord.h" #include "llvm/DebugInfo/MSF/StreamArray.h" +#include "llvm/DebugInfo/PDB/Native/HashTable.h" +#include "llvm/DebugInfo/PDB/Native/RawConstants.h" +#include "llvm/DebugInfo/PDB/Native/RawTypes.h" #include "llvm/DebugInfo/PDB/PDBTypes.h" -#include "llvm/DebugInfo/PDB/Raw/HashTable.h" -#include "llvm/DebugInfo/PDB/Raw/RawConstants.h" -#include "llvm/DebugInfo/PDB/Raw/RawTypes.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Support/Error.h" diff --git a/include/llvm/DebugInfo/PDB/Raw/TpiStreamBuilder.h b/include/llvm/DebugInfo/PDB/Native/TpiStreamBuilder.h similarity index 97% rename from include/llvm/DebugInfo/PDB/Raw/TpiStreamBuilder.h rename to include/llvm/DebugInfo/PDB/Native/TpiStreamBuilder.h index f9a642126f5..74145d4df9f 100644 --- a/include/llvm/DebugInfo/PDB/Raw/TpiStreamBuilder.h +++ b/include/llvm/DebugInfo/PDB/Native/TpiStreamBuilder.h @@ -14,7 +14,7 @@ #include "llvm/DebugInfo/CodeView/TypeRecord.h" #include "llvm/DebugInfo/MSF/ByteStream.h" #include "llvm/DebugInfo/MSF/SequencedItemStream.h" -#include "llvm/DebugInfo/PDB/Raw/RawConstants.h" +#include "llvm/DebugInfo/PDB/Native/RawConstants.h" #include "llvm/Support/Allocator.h" #include "llvm/Support/Error.h" diff --git a/include/llvm/DebugInfo/PDB/PDBTypes.h b/include/llvm/DebugInfo/PDB/PDBTypes.h index 0d232f15d74..900a9851a8c 100644 --- a/include/llvm/DebugInfo/PDB/PDBTypes.h +++ b/include/llvm/DebugInfo/PDB/PDBTypes.h @@ -12,7 +12,7 @@ #include "llvm/Config/llvm-config.h" #include "llvm/DebugInfo/CodeView/CodeView.h" -#include "llvm/DebugInfo/PDB/Raw/RawTypes.h" +#include "llvm/DebugInfo/PDB/Native/RawTypes.h" #include #include #include diff --git a/lib/DebugInfo/PDB/CMakeLists.txt b/lib/DebugInfo/PDB/CMakeLists.txt index 1a995e6b351..0f68c633732 100644 --- a/lib/DebugInfo/PDB/CMakeLists.txt +++ b/lib/DebugInfo/PDB/CMakeLists.txt @@ -27,32 +27,32 @@ if(LLVM_ENABLE_DIA_SDK) set(LIBPDB_ADDITIONAL_HEADER_DIRS "${LLVM_MAIN_INCLUDE_DIR}/llvm/DebugInfo/PDB/DIA") endif() -add_pdb_impl_folder(Raw - Raw/DbiStream.cpp - Raw/DbiStreamBuilder.cpp - Raw/EnumTables.cpp - Raw/GlobalsStream.cpp - Raw/GSI.cpp - Raw/Hash.cpp - Raw/HashTable.cpp - Raw/InfoStream.cpp - Raw/InfoStreamBuilder.cpp - Raw/ModInfo.cpp - Raw/ModStream.cpp - Raw/NamedStreamMap.cpp - Raw/PDBFile.cpp - Raw/PDBFileBuilder.cpp - Raw/PublicsStream.cpp - Raw/RawError.cpp - Raw/RawSession.cpp - Raw/StringTable.cpp - Raw/StringTableBuilder.cpp - Raw/SymbolStream.cpp - Raw/TpiHashing.cpp - Raw/TpiStream.cpp - Raw/TpiStreamBuilder.cpp) +add_pdb_impl_folder(Native + Native/DbiStream.cpp + Native/DbiStreamBuilder.cpp + Native/EnumTables.cpp + Native/GlobalsStream.cpp + Native/GSI.cpp + Native/Hash.cpp + Native/HashTable.cpp + Native/InfoStream.cpp + Native/InfoStreamBuilder.cpp + Native/ModInfo.cpp + Native/ModStream.cpp + Native/NamedStreamMap.cpp + Native/NativeSession.cpp + Native/PDBFile.cpp + Native/PDBFileBuilder.cpp + Native/PublicsStream.cpp + Native/RawError.cpp + Native/StringTable.cpp + Native/StringTableBuilder.cpp + Native/SymbolStream.cpp + Native/TpiHashing.cpp + Native/TpiStream.cpp + Native/TpiStreamBuilder.cpp) -list(APPEND LIBPDB_ADDITIONAL_HEADER_DIRS "${LLVM_MAIN_INCLUDE_DIR}/llvm/DebugInfo/PDB/Raw") +list(APPEND LIBPDB_ADDITIONAL_HEADER_DIRS "${LLVM_MAIN_INCLUDE_DIR}/llvm/DebugInfo/PDB/Native") list(APPEND LIBPDB_ADDITIONAL_HEADER_DIRS "${LLVM_MAIN_INCLUDE_DIR}/llvm/DebugInfo/PDB") add_llvm_library(LLVMDebugInfoPDB diff --git a/lib/DebugInfo/PDB/Raw/DbiStream.cpp b/lib/DebugInfo/PDB/Native/DbiStream.cpp similarity index 96% rename from lib/DebugInfo/PDB/Raw/DbiStream.cpp rename to lib/DebugInfo/PDB/Native/DbiStream.cpp index cb390d2fa06..5d15e62d3e4 100644 --- a/lib/DebugInfo/PDB/Raw/DbiStream.cpp +++ b/lib/DebugInfo/PDB/Native/DbiStream.cpp @@ -7,19 +7,19 @@ // //===----------------------------------------------------------------------===// +#include "llvm/DebugInfo/PDB/Native/DbiStream.h" #include "llvm/ADT/StringRef.h" #include "llvm/DebugInfo/MSF/MappedBlockStream.h" #include "llvm/DebugInfo/MSF/StreamArray.h" #include "llvm/DebugInfo/MSF/StreamReader.h" +#include "llvm/DebugInfo/PDB/Native/ISectionContribVisitor.h" +#include "llvm/DebugInfo/PDB/Native/InfoStream.h" +#include "llvm/DebugInfo/PDB/Native/ModInfo.h" +#include "llvm/DebugInfo/PDB/Native/PDBFile.h" +#include "llvm/DebugInfo/PDB/Native/RawConstants.h" +#include "llvm/DebugInfo/PDB/Native/RawError.h" +#include "llvm/DebugInfo/PDB/Native/RawTypes.h" #include "llvm/DebugInfo/PDB/PDBTypes.h" -#include "llvm/DebugInfo/PDB/Raw/DbiStream.h" -#include "llvm/DebugInfo/PDB/Raw/ISectionContribVisitor.h" -#include "llvm/DebugInfo/PDB/Raw/InfoStream.h" -#include "llvm/DebugInfo/PDB/Raw/ModInfo.h" -#include "llvm/DebugInfo/PDB/Raw/PDBFile.h" -#include "llvm/DebugInfo/PDB/Raw/RawConstants.h" -#include "llvm/DebugInfo/PDB/Raw/RawError.h" -#include "llvm/DebugInfo/PDB/Raw/RawTypes.h" #include "llvm/Object/COFF.h" #include "llvm/Support/Error.h" #include @@ -47,8 +47,7 @@ static Error loadSectionContribs(FixedStreamArray &Output, } DbiStream::DbiStream(PDBFile &File, std::unique_ptr Stream) - : Pdb(File), Stream(std::move(Stream)), Header(nullptr) { -} + : Pdb(File), Stream(std::move(Stream)), Header(nullptr) {} DbiStream::~DbiStream() = default; @@ -126,8 +125,8 @@ Error DbiStream::reload() { return EC; if (auto EC = Reader.readStreamRef(ECSubstream, Header->ECSubstreamSize)) return EC; - if (auto EC = Reader.readArray(DbgStreams, Header->OptionalDbgHdrSize / - sizeof(ulittle16_t))) + if (auto EC = Reader.readArray( + DbgStreams, Header->OptionalDbgHdrSize / sizeof(ulittle16_t))) return EC; if (auto EC = initializeSectionContributionData()) diff --git a/lib/DebugInfo/PDB/Raw/DbiStreamBuilder.cpp b/lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp similarity index 98% rename from lib/DebugInfo/PDB/Raw/DbiStreamBuilder.cpp rename to lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp index 1d5b8d693b1..df6e9b060df 100644 --- a/lib/DebugInfo/PDB/Raw/DbiStreamBuilder.cpp +++ b/lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp @@ -7,14 +7,14 @@ // //===----------------------------------------------------------------------===// -#include "llvm/DebugInfo/PDB/Raw/DbiStreamBuilder.h" +#include "llvm/DebugInfo/PDB/Native/DbiStreamBuilder.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/DebugInfo/MSF/MSFBuilder.h" #include "llvm/DebugInfo/MSF/MappedBlockStream.h" #include "llvm/DebugInfo/MSF/StreamWriter.h" -#include "llvm/DebugInfo/PDB/Raw/DbiStream.h" -#include "llvm/DebugInfo/PDB/Raw/RawError.h" +#include "llvm/DebugInfo/PDB/Native/DbiStream.h" +#include "llvm/DebugInfo/PDB/Native/RawError.h" #include "llvm/Object/COFF.h" #include "llvm/Support/COFF.h" diff --git a/lib/DebugInfo/PDB/Raw/EnumTables.cpp b/lib/DebugInfo/PDB/Native/EnumTables.cpp similarity index 92% rename from lib/DebugInfo/PDB/Raw/EnumTables.cpp rename to lib/DebugInfo/PDB/Native/EnumTables.cpp index fc9270c6994..b3837dc72e5 100644 --- a/lib/DebugInfo/PDB/Raw/EnumTables.cpp +++ b/lib/DebugInfo/PDB/Native/EnumTables.cpp @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// -#include "llvm/DebugInfo/PDB/Raw/EnumTables.h" -#include "llvm/DebugInfo/PDB/Raw/RawConstants.h" +#include "llvm/DebugInfo/PDB/Native/EnumTables.h" +#include "llvm/DebugInfo/PDB/Native/RawConstants.h" using namespace llvm; using namespace llvm::pdb; diff --git a/lib/DebugInfo/PDB/Raw/GSI.cpp b/lib/DebugInfo/PDB/Native/GSI.cpp similarity index 97% rename from lib/DebugInfo/PDB/Raw/GSI.cpp rename to lib/DebugInfo/PDB/Native/GSI.cpp index 6ecbb5c8cfa..c98603f87e1 100644 --- a/lib/DebugInfo/PDB/Raw/GSI.cpp +++ b/lib/DebugInfo/PDB/Native/GSI.cpp @@ -11,8 +11,8 @@ #include "llvm/DebugInfo/MSF/StreamArray.h" #include "llvm/DebugInfo/MSF/StreamReader.h" -#include "llvm/DebugInfo/PDB/Raw/RawError.h" -#include "llvm/DebugInfo/PDB/Raw/RawTypes.h" +#include "llvm/DebugInfo/PDB/Native/RawError.h" +#include "llvm/DebugInfo/PDB/Native/RawTypes.h" #include "llvm/Support/Error.h" diff --git a/lib/DebugInfo/PDB/Raw/GSI.h b/lib/DebugInfo/PDB/Native/GSI.h similarity index 97% rename from lib/DebugInfo/PDB/Raw/GSI.h rename to lib/DebugInfo/PDB/Native/GSI.h index 82cebd94653..d5f2fb1f121 100644 --- a/lib/DebugInfo/PDB/Raw/GSI.h +++ b/lib/DebugInfo/PDB/Native/GSI.h @@ -26,7 +26,7 @@ #define LLVM_LIB_DEBUGINFO_PDB_RAW_GSI_H #include "llvm/DebugInfo/MSF/StreamArray.h" -#include "llvm/DebugInfo/PDB/Raw/RawTypes.h" +#include "llvm/DebugInfo/PDB/Native/RawTypes.h" #include "llvm/Support/Endian.h" #include "llvm/Support/Error.h" diff --git a/lib/DebugInfo/PDB/Raw/GlobalsStream.cpp b/lib/DebugInfo/PDB/Native/GlobalsStream.cpp similarity index 95% rename from lib/DebugInfo/PDB/Raw/GlobalsStream.cpp rename to lib/DebugInfo/PDB/Native/GlobalsStream.cpp index 31afc9200b1..2f204ed0190 100644 --- a/lib/DebugInfo/PDB/Raw/GlobalsStream.cpp +++ b/lib/DebugInfo/PDB/Native/GlobalsStream.cpp @@ -7,9 +7,9 @@ // //===----------------------------------------------------------------------===// +#include "llvm/DebugInfo/PDB/Native/GlobalsStream.h" #include "GSI.h" #include "llvm/DebugInfo/MSF/StreamReader.h" -#include "llvm/DebugInfo/PDB/Raw/GlobalsStream.h" #include "llvm/Support/Error.h" #include diff --git a/lib/DebugInfo/PDB/Raw/Hash.cpp b/lib/DebugInfo/PDB/Native/Hash.cpp similarity index 98% rename from lib/DebugInfo/PDB/Raw/Hash.cpp rename to lib/DebugInfo/PDB/Native/Hash.cpp index b9f685ec69d..2ad3f55dc5c 100644 --- a/lib/DebugInfo/PDB/Raw/Hash.cpp +++ b/lib/DebugInfo/PDB/Native/Hash.cpp @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// -#include "llvm/DebugInfo/PDB/Raw/Hash.h" +#include "llvm/DebugInfo/PDB/Native/Hash.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/Support/Endian.h" diff --git a/lib/DebugInfo/PDB/Raw/HashTable.cpp b/lib/DebugInfo/PDB/Native/HashTable.cpp similarity index 98% rename from lib/DebugInfo/PDB/Raw/HashTable.cpp rename to lib/DebugInfo/PDB/Native/HashTable.cpp index aadc13e53a5..b3fe6fa45c5 100644 --- a/lib/DebugInfo/PDB/Raw/HashTable.cpp +++ b/lib/DebugInfo/PDB/Native/HashTable.cpp @@ -7,11 +7,11 @@ // //===----------------------------------------------------------------------===// -#include "llvm/DebugInfo/PDB/Raw/HashTable.h" +#include "llvm/DebugInfo/PDB/Native/HashTable.h" #include "llvm/ADT/Optional.h" #include "llvm/ADT/SparseBitVector.h" -#include "llvm/DebugInfo/PDB/Raw/RawError.h" +#include "llvm/DebugInfo/PDB/Native/RawError.h" #include diff --git a/lib/DebugInfo/PDB/Raw/InfoStream.cpp b/lib/DebugInfo/PDB/Native/InfoStream.cpp similarity index 89% rename from lib/DebugInfo/PDB/Raw/InfoStream.cpp rename to lib/DebugInfo/PDB/Native/InfoStream.cpp index 9abcfbf0244..b003ecc1440 100644 --- a/lib/DebugInfo/PDB/Raw/InfoStream.cpp +++ b/lib/DebugInfo/PDB/Native/InfoStream.cpp @@ -7,15 +7,15 @@ // //===----------------------------------------------------------------------===// -#include "llvm/DebugInfo/PDB/Raw/InfoStream.h" +#include "llvm/DebugInfo/PDB/Native/InfoStream.h" #include "llvm/ADT/BitVector.h" #include "llvm/ADT/SmallVector.h" #include "llvm/DebugInfo/MSF/StreamReader.h" #include "llvm/DebugInfo/MSF/StreamWriter.h" -#include "llvm/DebugInfo/PDB/Raw/PDBFile.h" -#include "llvm/DebugInfo/PDB/Raw/RawConstants.h" -#include "llvm/DebugInfo/PDB/Raw/RawError.h" -#include "llvm/DebugInfo/PDB/Raw/RawTypes.h" +#include "llvm/DebugInfo/PDB/Native/PDBFile.h" +#include "llvm/DebugInfo/PDB/Native/RawConstants.h" +#include "llvm/DebugInfo/PDB/Native/RawError.h" +#include "llvm/DebugInfo/PDB/Native/RawTypes.h" using namespace llvm; using namespace llvm::codeview; diff --git a/lib/DebugInfo/PDB/Raw/InfoStreamBuilder.cpp b/lib/DebugInfo/PDB/Native/InfoStreamBuilder.cpp similarity index 84% rename from lib/DebugInfo/PDB/Raw/InfoStreamBuilder.cpp rename to lib/DebugInfo/PDB/Native/InfoStreamBuilder.cpp index 4d8eb85814d..d45bd10729f 100644 --- a/lib/DebugInfo/PDB/Raw/InfoStreamBuilder.cpp +++ b/lib/DebugInfo/PDB/Native/InfoStreamBuilder.cpp @@ -7,16 +7,16 @@ // //===----------------------------------------------------------------------===// -#include "llvm/DebugInfo/PDB/Raw/InfoStreamBuilder.h" +#include "llvm/DebugInfo/PDB/Native/InfoStreamBuilder.h" #include "llvm/DebugInfo/MSF/MSFBuilder.h" #include "llvm/DebugInfo/MSF/MappedBlockStream.h" #include "llvm/DebugInfo/MSF/StreamWriter.h" -#include "llvm/DebugInfo/PDB/Raw/InfoStream.h" -#include "llvm/DebugInfo/PDB/Raw/NamedStreamMap.h" -#include "llvm/DebugInfo/PDB/Raw/PDBFileBuilder.h" -#include "llvm/DebugInfo/PDB/Raw/RawError.h" -#include "llvm/DebugInfo/PDB/Raw/RawTypes.h" +#include "llvm/DebugInfo/PDB/Native/InfoStream.h" +#include "llvm/DebugInfo/PDB/Native/NamedStreamMap.h" +#include "llvm/DebugInfo/PDB/Native/PDBFileBuilder.h" +#include "llvm/DebugInfo/PDB/Native/RawError.h" +#include "llvm/DebugInfo/PDB/Native/RawTypes.h" using namespace llvm; using namespace llvm::codeview; diff --git a/lib/DebugInfo/PDB/Raw/ModInfo.cpp b/lib/DebugInfo/PDB/Native/ModInfo.cpp similarity index 95% rename from lib/DebugInfo/PDB/Raw/ModInfo.cpp rename to lib/DebugInfo/PDB/Native/ModInfo.cpp index b34d7700d03..762a92bc18e 100644 --- a/lib/DebugInfo/PDB/Raw/ModInfo.cpp +++ b/lib/DebugInfo/PDB/Native/ModInfo.cpp @@ -7,9 +7,9 @@ // //===----------------------------------------------------------------------===// +#include "llvm/DebugInfo/PDB/Native/ModInfo.h" #include "llvm/DebugInfo/MSF/StreamReader.h" -#include "llvm/DebugInfo/PDB/Raw/ModInfo.h" -#include "llvm/DebugInfo/PDB/Raw/RawTypes.h" +#include "llvm/DebugInfo/PDB/Native/RawTypes.h" #include "llvm/Support/Endian.h" #include "llvm/Support/Error.h" #include "llvm/Support/MathExtras.h" diff --git a/lib/DebugInfo/PDB/Raw/ModStream.cpp b/lib/DebugInfo/PDB/Native/ModStream.cpp similarity index 91% rename from lib/DebugInfo/PDB/Raw/ModStream.cpp rename to lib/DebugInfo/PDB/Native/ModStream.cpp index 0ffc5b7d44a..25370f26ec3 100644 --- a/lib/DebugInfo/PDB/Raw/ModStream.cpp +++ b/lib/DebugInfo/PDB/Native/ModStream.cpp @@ -7,15 +7,15 @@ // //===----------------------------------------------------------------------===// +#include "llvm/DebugInfo/PDB/Native/ModStream.h" #include "llvm/ADT/iterator_range.h" #include "llvm/DebugInfo/CodeView/SymbolRecord.h" #include "llvm/DebugInfo/MSF/StreamReader.h" #include "llvm/DebugInfo/MSF/StreamRef.h" -#include "llvm/DebugInfo/PDB/Raw/ModInfo.h" -#include "llvm/DebugInfo/PDB/Raw/ModStream.h" -#include "llvm/DebugInfo/PDB/Raw/PDBFile.h" -#include "llvm/DebugInfo/PDB/Raw/RawError.h" -#include "llvm/DebugInfo/PDB/Raw/RawTypes.h" +#include "llvm/DebugInfo/PDB/Native/ModInfo.h" +#include "llvm/DebugInfo/PDB/Native/PDBFile.h" +#include "llvm/DebugInfo/PDB/Native/RawError.h" +#include "llvm/DebugInfo/PDB/Native/RawTypes.h" #include "llvm/Support/Error.h" #include #include diff --git a/lib/DebugInfo/PDB/Raw/NamedStreamMap.cpp b/lib/DebugInfo/PDB/Native/NamedStreamMap.cpp similarity index 96% rename from lib/DebugInfo/PDB/Raw/NamedStreamMap.cpp rename to lib/DebugInfo/PDB/Native/NamedStreamMap.cpp index 54d2649ac22..47fd0e1ba24 100644 --- a/lib/DebugInfo/PDB/Raw/NamedStreamMap.cpp +++ b/lib/DebugInfo/PDB/Native/NamedStreamMap.cpp @@ -7,15 +7,15 @@ // //===----------------------------------------------------------------------===// -#include "llvm/DebugInfo/PDB/Raw/NamedStreamMap.h" +#include "llvm/DebugInfo/PDB/Native/NamedStreamMap.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/PDB/Raw/HashTable.h" -#include "llvm/DebugInfo/PDB/Raw/RawError.h" +#include "llvm/DebugInfo/PDB/Native/HashTable.h" +#include "llvm/DebugInfo/PDB/Native/RawError.h" #include "llvm/Support/Error.h" #include #include diff --git a/lib/DebugInfo/PDB/Raw/RawSession.cpp b/lib/DebugInfo/PDB/Native/NativeSession.cpp similarity index 50% rename from lib/DebugInfo/PDB/Raw/RawSession.cpp rename to lib/DebugInfo/PDB/Native/NativeSession.cpp index cd3a2064c71..e2c23317511 100644 --- a/lib/DebugInfo/PDB/Raw/RawSession.cpp +++ b/lib/DebugInfo/PDB/Native/NativeSession.cpp @@ -1,4 +1,4 @@ -//===- RawSession.cpp - Raw implementation of IPDBSession -------*- C++ -*-===// +//===- NativeSession.cpp - Native implementation of IPDBSession -*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -7,16 +7,17 @@ // //===----------------------------------------------------------------------===// +#include "llvm/DebugInfo/PDB/Native/NativeSession.h" + #include "llvm/ADT/STLExtras.h" #include "llvm/DebugInfo/MSF/ByteStream.h" #include "llvm/DebugInfo/PDB/GenericError.h" #include "llvm/DebugInfo/PDB/IPDBEnumChildren.h" #include "llvm/DebugInfo/PDB/IPDBSourceFile.h" +#include "llvm/DebugInfo/PDB/Native/PDBFile.h" +#include "llvm/DebugInfo/PDB/Native/RawError.h" #include "llvm/DebugInfo/PDB/PDBSymbolCompiland.h" #include "llvm/DebugInfo/PDB/PDBSymbolExe.h" -#include "llvm/DebugInfo/PDB/Raw/PDBFile.h" -#include "llvm/DebugInfo/PDB/Raw/RawError.h" -#include "llvm/DebugInfo/PDB/Raw/RawSession.h" #include "llvm/Support/Allocator.h" #include "llvm/Support/Error.h" #include "llvm/Support/ErrorOr.h" @@ -28,14 +29,14 @@ using namespace llvm; using namespace llvm::msf; using namespace llvm::pdb; -RawSession::RawSession(std::unique_ptr PdbFile, - std::unique_ptr Allocator) +NativeSession::NativeSession(std::unique_ptr PdbFile, + std::unique_ptr Allocator) : Pdb(std::move(PdbFile)), Allocator(std::move(Allocator)) {} -RawSession::~RawSession() = default; +NativeSession::~NativeSession() = default; -Error RawSession::createFromPdb(StringRef Path, - std::unique_ptr &Session) { +Error NativeSession::createFromPdb(StringRef Path, + std::unique_ptr &Session) { ErrorOr> ErrorOrBuffer = MemoryBuffer::getFileOrSTDIN(Path, /*FileSize=*/-1, /*RequiresNullTerminator=*/false); @@ -53,84 +54,86 @@ Error RawSession::createFromPdb(StringRef Path, return EC; Session = - llvm::make_unique(std::move(File), std::move(Allocator)); + llvm::make_unique(std::move(File), std::move(Allocator)); return Error::success(); } -Error RawSession::createFromExe(StringRef Path, - std::unique_ptr &Session) { +Error NativeSession::createFromExe(StringRef Path, + std::unique_ptr &Session) { return make_error(raw_error_code::feature_unsupported); } -uint64_t RawSession::getLoadAddress() const { return 0; } +uint64_t NativeSession::getLoadAddress() const { return 0; } -void RawSession::setLoadAddress(uint64_t Address) {} +void NativeSession::setLoadAddress(uint64_t Address) {} -std::unique_ptr RawSession::getGlobalScope() const { - return nullptr; -} - -std::unique_ptr RawSession::getSymbolById(uint32_t SymbolId) const { +std::unique_ptr NativeSession::getGlobalScope() const { return nullptr; } std::unique_ptr -RawSession::findSymbolByAddress(uint64_t Address, PDB_SymType Type) const { +NativeSession::getSymbolById(uint32_t SymbolId) const { + return nullptr; +} + +std::unique_ptr +NativeSession::findSymbolByAddress(uint64_t Address, PDB_SymType Type) const { return nullptr; } std::unique_ptr -RawSession::findLineNumbers(const PDBSymbolCompiland &Compiland, - const IPDBSourceFile &File) const { +NativeSession::findLineNumbers(const PDBSymbolCompiland &Compiland, + const IPDBSourceFile &File) const { return nullptr; } std::unique_ptr -RawSession::findLineNumbersByAddress(uint64_t Address, uint32_t Length) const { +NativeSession::findLineNumbersByAddress(uint64_t Address, + uint32_t Length) const { return nullptr; } std::unique_ptr -RawSession::findSourceFiles(const PDBSymbolCompiland *Compiland, - StringRef Pattern, - PDB_NameSearchFlags Flags) const { +NativeSession::findSourceFiles(const PDBSymbolCompiland *Compiland, + StringRef Pattern, + PDB_NameSearchFlags Flags) const { return nullptr; } std::unique_ptr -RawSession::findOneSourceFile(const PDBSymbolCompiland *Compiland, - StringRef Pattern, - PDB_NameSearchFlags Flags) const { +NativeSession::findOneSourceFile(const PDBSymbolCompiland *Compiland, + StringRef Pattern, + PDB_NameSearchFlags Flags) const { return nullptr; } std::unique_ptr> -RawSession::findCompilandsForSourceFile(StringRef Pattern, - PDB_NameSearchFlags Flags) const { +NativeSession::findCompilandsForSourceFile(StringRef Pattern, + PDB_NameSearchFlags Flags) const { return nullptr; } std::unique_ptr -RawSession::findOneCompilandForSourceFile(StringRef Pattern, - PDB_NameSearchFlags Flags) const { +NativeSession::findOneCompilandForSourceFile(StringRef Pattern, + PDB_NameSearchFlags Flags) const { return nullptr; } -std::unique_ptr RawSession::getAllSourceFiles() const { +std::unique_ptr NativeSession::getAllSourceFiles() const { return nullptr; } -std::unique_ptr RawSession::getSourceFilesForCompiland( +std::unique_ptr NativeSession::getSourceFilesForCompiland( const PDBSymbolCompiland &Compiland) const { return nullptr; } std::unique_ptr -RawSession::getSourceFileById(uint32_t FileId) const { +NativeSession::getSourceFileById(uint32_t FileId) const { return nullptr; } -std::unique_ptr RawSession::getDebugStreams() const { +std::unique_ptr NativeSession::getDebugStreams() const { return nullptr; } diff --git a/lib/DebugInfo/PDB/Raw/PDBFile.cpp b/lib/DebugInfo/PDB/Native/PDBFile.cpp similarity index 91% rename from lib/DebugInfo/PDB/Raw/PDBFile.cpp rename to lib/DebugInfo/PDB/Native/PDBFile.cpp index aef86c2ea99..02e883b8418 100644 --- a/lib/DebugInfo/PDB/Raw/PDBFile.cpp +++ b/lib/DebugInfo/PDB/Native/PDBFile.cpp @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// -#include "llvm/DebugInfo/PDB/Raw/PDBFile.h" +#include "llvm/DebugInfo/PDB/Native/PDBFile.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/STLExtras.h" #include "llvm/DebugInfo/MSF/MSFCommon.h" @@ -15,14 +15,14 @@ #include "llvm/DebugInfo/MSF/StreamArray.h" #include "llvm/DebugInfo/MSF/StreamInterface.h" #include "llvm/DebugInfo/MSF/StreamReader.h" -#include "llvm/DebugInfo/PDB/Raw/DbiStream.h" -#include "llvm/DebugInfo/PDB/Raw/GlobalsStream.h" -#include "llvm/DebugInfo/PDB/Raw/InfoStream.h" -#include "llvm/DebugInfo/PDB/Raw/PublicsStream.h" -#include "llvm/DebugInfo/PDB/Raw/RawError.h" -#include "llvm/DebugInfo/PDB/Raw/StringTable.h" -#include "llvm/DebugInfo/PDB/Raw/SymbolStream.h" -#include "llvm/DebugInfo/PDB/Raw/TpiStream.h" +#include "llvm/DebugInfo/PDB/Native/DbiStream.h" +#include "llvm/DebugInfo/PDB/Native/GlobalsStream.h" +#include "llvm/DebugInfo/PDB/Native/InfoStream.h" +#include "llvm/DebugInfo/PDB/Native/PublicsStream.h" +#include "llvm/DebugInfo/PDB/Native/RawError.h" +#include "llvm/DebugInfo/PDB/Native/StringTable.h" +#include "llvm/DebugInfo/PDB/Native/SymbolStream.h" +#include "llvm/DebugInfo/PDB/Native/TpiStream.h" #include "llvm/Support/Endian.h" #include "llvm/Support/Error.h" #include @@ -229,7 +229,8 @@ Expected PDBFile::getPDBGlobalsStream() { auto GlobalS = safelyCreateIndexedStream( ContainerLayout, *Buffer, DbiS->getGlobalSymbolStreamIndex()); - if (!GlobalS) return GlobalS.takeError(); + if (!GlobalS) + return GlobalS.takeError(); auto TempGlobals = llvm::make_unique(std::move(*GlobalS)); if (auto EC = TempGlobals->reload()) return std::move(EC); @@ -241,7 +242,8 @@ Expected PDBFile::getPDBGlobalsStream() { Expected PDBFile::getPDBInfoStream() { if (!Info) { auto InfoS = safelyCreateIndexedStream(ContainerLayout, *Buffer, StreamPDB); - if (!InfoS) return InfoS.takeError(); + if (!InfoS) + return InfoS.takeError(); auto TempInfo = llvm::make_unique(std::move(*InfoS)); if (auto EC = TempInfo->reload()) return std::move(EC); @@ -253,7 +255,8 @@ Expected PDBFile::getPDBInfoStream() { Expected PDBFile::getPDBDbiStream() { if (!Dbi) { auto DbiS = safelyCreateIndexedStream(ContainerLayout, *Buffer, StreamDBI); - if (!DbiS) return DbiS.takeError(); + if (!DbiS) + return DbiS.takeError(); auto TempDbi = llvm::make_unique(*this, std::move(*DbiS)); if (auto EC = TempDbi->reload()) return std::move(EC); @@ -265,7 +268,8 @@ Expected PDBFile::getPDBDbiStream() { Expected PDBFile::getPDBTpiStream() { if (!Tpi) { auto TpiS = safelyCreateIndexedStream(ContainerLayout, *Buffer, StreamTPI); - if (!TpiS) return TpiS.takeError(); + if (!TpiS) + return TpiS.takeError(); auto TempTpi = llvm::make_unique(*this, std::move(*TpiS)); if (auto EC = TempTpi->reload()) return std::move(EC); @@ -277,7 +281,8 @@ Expected PDBFile::getPDBTpiStream() { Expected PDBFile::getPDBIpiStream() { if (!Ipi) { auto IpiS = safelyCreateIndexedStream(ContainerLayout, *Buffer, StreamIPI); - if (!IpiS) return IpiS.takeError(); + if (!IpiS) + return IpiS.takeError(); auto TempIpi = llvm::make_unique(*this, std::move(*IpiS)); if (auto EC = TempIpi->reload()) return std::move(EC); @@ -294,7 +299,8 @@ Expected PDBFile::getPDBPublicsStream() { auto PublicS = safelyCreateIndexedStream( ContainerLayout, *Buffer, DbiS->getPublicSymbolStreamIndex()); - if (!PublicS) return PublicS.takeError(); + if (!PublicS) + return PublicS.takeError(); auto TempPublics = llvm::make_unique(*this, std::move(*PublicS)); if (auto EC = TempPublics->reload()) @@ -313,7 +319,8 @@ Expected PDBFile::getPDBSymbolStream() { uint32_t SymbolStreamNum = DbiS->getSymRecordStreamIndex(); auto SymbolS = safelyCreateIndexedStream(ContainerLayout, *Buffer, SymbolStreamNum); - if (!SymbolS) return SymbolS.takeError(); + if (!SymbolS) + return SymbolS.takeError(); auto TempSymbols = llvm::make_unique(std::move(*SymbolS)); if (auto EC = TempSymbols->reload()) @@ -333,7 +340,8 @@ Expected PDBFile::getStringTable() { auto NS = safelyCreateIndexedStream(ContainerLayout, *Buffer, NameStreamIndex); - if (!NS) return NS.takeError(); + if (!NS) + return NS.takeError(); StreamReader Reader(**NS); auto N = llvm::make_unique(); @@ -349,7 +357,8 @@ bool PDBFile::hasPDBDbiStream() const { return StreamDBI < getNumStreams(); } bool PDBFile::hasPDBGlobalsStream() { auto DbiS = getPDBDbiStream(); - if (!DbiS) return false; + if (!DbiS) + return false; return DbiS->getGlobalSymbolStreamIndex() < getNumStreams(); } @@ -359,13 +368,15 @@ bool PDBFile::hasPDBIpiStream() const { return StreamIPI < getNumStreams(); } bool PDBFile::hasPDBPublicsStream() { auto DbiS = getPDBDbiStream(); - if (!DbiS) return false; + if (!DbiS) + return false; return DbiS->getPublicSymbolStreamIndex() < getNumStreams(); } bool PDBFile::hasPDBSymbolStream() { auto DbiS = getPDBDbiStream(); - if (!DbiS) return false; + if (!DbiS) + return false; return DbiS->getSymRecordStreamIndex() < getNumStreams(); } @@ -373,7 +384,8 @@ bool PDBFile::hasPDBTpiStream() const { return StreamTPI < getNumStreams(); } bool PDBFile::hasStringTable() { auto IS = getPDBInfoStream(); - if (!IS) return false; + if (!IS) + return false; return IS->getNamedStreamIndex("/names") < getNumStreams(); } @@ -382,9 +394,10 @@ bool PDBFile::hasStringTable() { /// If it does not, the return value will have an MSFError with /// code msf_error_code::no_stream. Else, the return value will /// contain the stream returned by createIndexedStream(). -Expected> PDBFile::safelyCreateIndexedStream( - const MSFLayout &Layout, const ReadableStream &MsfData, - uint32_t StreamIndex) const { +Expected> +PDBFile::safelyCreateIndexedStream(const MSFLayout &Layout, + const ReadableStream &MsfData, + uint32_t StreamIndex) const { if (StreamIndex >= getNumStreams()) return make_error(raw_error_code::no_stream); return MappedBlockStream::createIndexedStream(Layout, MsfData, StreamIndex); diff --git a/lib/DebugInfo/PDB/Raw/PDBFileBuilder.cpp b/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp similarity index 90% rename from lib/DebugInfo/PDB/Raw/PDBFileBuilder.cpp rename to lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp index cfd5ba6b83e..57ca2ba488a 100644 --- a/lib/DebugInfo/PDB/Raw/PDBFileBuilder.cpp +++ b/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// -#include "llvm/DebugInfo/PDB/Raw/PDBFileBuilder.h" +#include "llvm/DebugInfo/PDB/Native/PDBFileBuilder.h" #include "llvm/ADT/BitVector.h" @@ -15,14 +15,14 @@ #include "llvm/DebugInfo/MSF/StreamInterface.h" #include "llvm/DebugInfo/MSF/StreamWriter.h" #include "llvm/DebugInfo/PDB/GenericError.h" -#include "llvm/DebugInfo/PDB/Raw/DbiStream.h" -#include "llvm/DebugInfo/PDB/Raw/DbiStreamBuilder.h" -#include "llvm/DebugInfo/PDB/Raw/InfoStream.h" -#include "llvm/DebugInfo/PDB/Raw/InfoStreamBuilder.h" -#include "llvm/DebugInfo/PDB/Raw/RawError.h" -#include "llvm/DebugInfo/PDB/Raw/StringTableBuilder.h" -#include "llvm/DebugInfo/PDB/Raw/TpiStream.h" -#include "llvm/DebugInfo/PDB/Raw/TpiStreamBuilder.h" +#include "llvm/DebugInfo/PDB/Native/DbiStream.h" +#include "llvm/DebugInfo/PDB/Native/DbiStreamBuilder.h" +#include "llvm/DebugInfo/PDB/Native/InfoStream.h" +#include "llvm/DebugInfo/PDB/Native/InfoStreamBuilder.h" +#include "llvm/DebugInfo/PDB/Native/RawError.h" +#include "llvm/DebugInfo/PDB/Native/StringTableBuilder.h" +#include "llvm/DebugInfo/PDB/Native/TpiStream.h" +#include "llvm/DebugInfo/PDB/Native/TpiStreamBuilder.h" using namespace llvm; using namespace llvm::codeview; diff --git a/lib/DebugInfo/PDB/Raw/PublicsStream.cpp b/lib/DebugInfo/PDB/Native/PublicsStream.cpp similarity index 95% rename from lib/DebugInfo/PDB/Raw/PublicsStream.cpp rename to lib/DebugInfo/PDB/Native/PublicsStream.cpp index b31f605a078..ddec60a4371 100644 --- a/lib/DebugInfo/PDB/Raw/PublicsStream.cpp +++ b/lib/DebugInfo/PDB/Native/PublicsStream.cpp @@ -22,15 +22,15 @@ // //===----------------------------------------------------------------------===// +#include "llvm/DebugInfo/PDB/Native/PublicsStream.h" #include "GSI.h" #include "llvm/ADT/iterator_range.h" #include "llvm/DebugInfo/CodeView/SymbolRecord.h" #include "llvm/DebugInfo/MSF/MappedBlockStream.h" #include "llvm/DebugInfo/MSF/StreamReader.h" -#include "llvm/DebugInfo/PDB/Raw/PDBFile.h" -#include "llvm/DebugInfo/PDB/Raw/PublicsStream.h" -#include "llvm/DebugInfo/PDB/Raw/RawError.h" -#include "llvm/DebugInfo/PDB/Raw/SymbolStream.h" +#include "llvm/DebugInfo/PDB/Native/PDBFile.h" +#include "llvm/DebugInfo/PDB/Native/RawError.h" +#include "llvm/DebugInfo/PDB/Native/SymbolStream.h" #include "llvm/Support/Endian.h" #include "llvm/Support/Error.h" #include diff --git a/lib/DebugInfo/PDB/Raw/RawError.cpp b/lib/DebugInfo/PDB/Native/RawError.cpp similarity index 98% rename from lib/DebugInfo/PDB/Raw/RawError.cpp rename to lib/DebugInfo/PDB/Native/RawError.cpp index f4a5057509e..aa126bb8f1a 100644 --- a/lib/DebugInfo/PDB/Raw/RawError.cpp +++ b/lib/DebugInfo/PDB/Native/RawError.cpp @@ -1,4 +1,4 @@ -#include "llvm/DebugInfo/PDB/Raw/RawError.h" +#include "llvm/DebugInfo/PDB/Native/RawError.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/ManagedStatic.h" diff --git a/lib/DebugInfo/PDB/Raw/StringTable.cpp b/lib/DebugInfo/PDB/Native/StringTable.cpp similarity index 94% rename from lib/DebugInfo/PDB/Raw/StringTable.cpp rename to lib/DebugInfo/PDB/Native/StringTable.cpp index ed78cb42da6..5b8ae9b7e9c 100644 --- a/lib/DebugInfo/PDB/Raw/StringTable.cpp +++ b/lib/DebugInfo/PDB/Native/StringTable.cpp @@ -7,13 +7,13 @@ // //===----------------------------------------------------------------------===// -#include "llvm/DebugInfo/PDB/Raw/StringTable.h" +#include "llvm/DebugInfo/PDB/Native/StringTable.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/DebugInfo/MSF/StreamReader.h" -#include "llvm/DebugInfo/PDB/Raw/Hash.h" -#include "llvm/DebugInfo/PDB/Raw/RawError.h" -#include "llvm/DebugInfo/PDB/Raw/RawTypes.h" +#include "llvm/DebugInfo/PDB/Native/Hash.h" +#include "llvm/DebugInfo/PDB/Native/RawError.h" +#include "llvm/DebugInfo/PDB/Native/RawTypes.h" #include "llvm/Support/Endian.h" using namespace llvm; diff --git a/lib/DebugInfo/PDB/Raw/StringTableBuilder.cpp b/lib/DebugInfo/PDB/Native/StringTableBuilder.cpp similarity index 95% rename from lib/DebugInfo/PDB/Raw/StringTableBuilder.cpp rename to lib/DebugInfo/PDB/Native/StringTableBuilder.cpp index 5ae74471a1a..ef9caee4cd6 100644 --- a/lib/DebugInfo/PDB/Raw/StringTableBuilder.cpp +++ b/lib/DebugInfo/PDB/Native/StringTableBuilder.cpp @@ -7,11 +7,11 @@ // //===----------------------------------------------------------------------===// -#include "llvm/DebugInfo/PDB/Raw/StringTableBuilder.h" +#include "llvm/DebugInfo/PDB/Native/StringTableBuilder.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/DebugInfo/MSF/StreamWriter.h" -#include "llvm/DebugInfo/PDB/Raw/Hash.h" -#include "llvm/DebugInfo/PDB/Raw/RawTypes.h" +#include "llvm/DebugInfo/PDB/Native/Hash.h" +#include "llvm/DebugInfo/PDB/Native/RawTypes.h" #include "llvm/Support/Endian.h" using namespace llvm; diff --git a/lib/DebugInfo/PDB/Raw/SymbolStream.cpp b/lib/DebugInfo/PDB/Native/SymbolStream.cpp similarity index 86% rename from lib/DebugInfo/PDB/Raw/SymbolStream.cpp rename to lib/DebugInfo/PDB/Native/SymbolStream.cpp index 2f3ac3497f3..a38d0957092 100644 --- a/lib/DebugInfo/PDB/Raw/SymbolStream.cpp +++ b/lib/DebugInfo/PDB/Native/SymbolStream.cpp @@ -7,15 +7,15 @@ // //===----------------------------------------------------------------------===// -#include "llvm/DebugInfo/PDB/Raw/SymbolStream.h" +#include "llvm/DebugInfo/PDB/Native/SymbolStream.h" #include "llvm/DebugInfo/CodeView/CodeView.h" #include "llvm/DebugInfo/CodeView/TypeRecord.h" #include "llvm/DebugInfo/MSF/MappedBlockStream.h" #include "llvm/DebugInfo/MSF/StreamReader.h" -#include "llvm/DebugInfo/PDB/Raw/PDBFile.h" -#include "llvm/DebugInfo/PDB/Raw/RawConstants.h" -#include "llvm/DebugInfo/PDB/Raw/RawError.h" +#include "llvm/DebugInfo/PDB/Native/PDBFile.h" +#include "llvm/DebugInfo/PDB/Native/RawConstants.h" +#include "llvm/DebugInfo/PDB/Native/RawError.h" #include "llvm/Support/Endian.h" diff --git a/lib/DebugInfo/PDB/Raw/TpiHashing.cpp b/lib/DebugInfo/PDB/Native/TpiHashing.cpp similarity index 96% rename from lib/DebugInfo/PDB/Raw/TpiHashing.cpp rename to lib/DebugInfo/PDB/Native/TpiHashing.cpp index 6c3ddb3d57a..16904a5a27e 100644 --- a/lib/DebugInfo/PDB/Raw/TpiHashing.cpp +++ b/lib/DebugInfo/PDB/Native/TpiHashing.cpp @@ -7,10 +7,10 @@ // //===----------------------------------------------------------------------===// -#include "llvm/DebugInfo/PDB/Raw/TpiHashing.h" +#include "llvm/DebugInfo/PDB/Native/TpiHashing.h" -#include "llvm/DebugInfo/PDB/Raw/Hash.h" -#include "llvm/DebugInfo/PDB/Raw/RawError.h" +#include "llvm/DebugInfo/PDB/Native/Hash.h" +#include "llvm/DebugInfo/PDB/Native/RawError.h" using namespace llvm; using namespace llvm::codeview; diff --git a/lib/DebugInfo/PDB/Raw/TpiStream.cpp b/lib/DebugInfo/PDB/Native/TpiStream.cpp similarity index 91% rename from lib/DebugInfo/PDB/Raw/TpiStream.cpp rename to lib/DebugInfo/PDB/Native/TpiStream.cpp index a2cba6bcc23..603a2c5e833 100644 --- a/lib/DebugInfo/PDB/Raw/TpiStream.cpp +++ b/lib/DebugInfo/PDB/Native/TpiStream.cpp @@ -7,6 +7,7 @@ // //===----------------------------------------------------------------------===// +#include "llvm/DebugInfo/PDB/Native/TpiStream.h" #include "llvm/ADT/iterator_range.h" #include "llvm/DebugInfo/CodeView/CVTypeVisitor.h" #include "llvm/DebugInfo/CodeView/TypeDeserializer.h" @@ -14,12 +15,11 @@ #include "llvm/DebugInfo/CodeView/TypeVisitorCallbackPipeline.h" #include "llvm/DebugInfo/MSF/MappedBlockStream.h" #include "llvm/DebugInfo/MSF/StreamReader.h" -#include "llvm/DebugInfo/PDB/Raw/PDBFile.h" -#include "llvm/DebugInfo/PDB/Raw/RawConstants.h" -#include "llvm/DebugInfo/PDB/Raw/RawError.h" -#include "llvm/DebugInfo/PDB/Raw/RawTypes.h" -#include "llvm/DebugInfo/PDB/Raw/TpiHashing.h" -#include "llvm/DebugInfo/PDB/Raw/TpiStream.h" +#include "llvm/DebugInfo/PDB/Native/PDBFile.h" +#include "llvm/DebugInfo/PDB/Native/RawConstants.h" +#include "llvm/DebugInfo/PDB/Native/RawError.h" +#include "llvm/DebugInfo/PDB/Native/RawTypes.h" +#include "llvm/DebugInfo/PDB/Native/TpiHashing.h" #include "llvm/Support/Endian.h" #include "llvm/Support/Error.h" #include @@ -154,20 +154,17 @@ uint16_t TpiStream::getTypeHashStreamAuxIndex() const { uint32_t TpiStream::NumHashBuckets() const { return Header->NumHashBuckets; } uint32_t TpiStream::getHashKeySize() const { return Header->HashKeySize; } -FixedStreamArray -TpiStream::getHashValues() const { +FixedStreamArray TpiStream::getHashValues() const { return HashValues; } -FixedStreamArray -TpiStream::getTypeIndexOffsets() const { +FixedStreamArray TpiStream::getTypeIndexOffsets() const { return TypeIndexOffsets; } HashTable &TpiStream::getHashAdjusters() { return HashAdjusters; } -iterator_range -TpiStream::types(bool *HadError) const { +iterator_range TpiStream::types(bool *HadError) const { return make_range(TypeRecords.begin(HadError), TypeRecords.end()); } diff --git a/lib/DebugInfo/PDB/Raw/TpiStreamBuilder.cpp b/lib/DebugInfo/PDB/Native/TpiStreamBuilder.cpp similarity index 94% rename from lib/DebugInfo/PDB/Raw/TpiStreamBuilder.cpp rename to lib/DebugInfo/PDB/Native/TpiStreamBuilder.cpp index c769321f18c..cff1977c8c4 100644 --- a/lib/DebugInfo/PDB/Raw/TpiStreamBuilder.cpp +++ b/lib/DebugInfo/PDB/Native/TpiStreamBuilder.cpp @@ -7,6 +7,7 @@ // //===----------------------------------------------------------------------===// +#include "llvm/DebugInfo/PDB/Native/TpiStreamBuilder.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/STLExtras.h" #include "llvm/DebugInfo/CodeView/TypeIndex.h" @@ -17,11 +18,10 @@ #include "llvm/DebugInfo/MSF/StreamArray.h" #include "llvm/DebugInfo/MSF/StreamReader.h" #include "llvm/DebugInfo/MSF/StreamWriter.h" -#include "llvm/DebugInfo/PDB/Raw/PDBFile.h" -#include "llvm/DebugInfo/PDB/Raw/RawError.h" -#include "llvm/DebugInfo/PDB/Raw/RawTypes.h" -#include "llvm/DebugInfo/PDB/Raw/TpiStream.h" -#include "llvm/DebugInfo/PDB/Raw/TpiStreamBuilder.h" +#include "llvm/DebugInfo/PDB/Native/PDBFile.h" +#include "llvm/DebugInfo/PDB/Native/RawError.h" +#include "llvm/DebugInfo/PDB/Native/RawTypes.h" +#include "llvm/DebugInfo/PDB/Native/TpiStream.h" #include "llvm/Support/Allocator.h" #include "llvm/Support/Endian.h" #include "llvm/Support/Error.h" diff --git a/lib/DebugInfo/PDB/PDB.cpp b/lib/DebugInfo/PDB/PDB.cpp index 0d720591b81..1011e11b586 100644 --- a/lib/DebugInfo/PDB/PDB.cpp +++ b/lib/DebugInfo/PDB/PDB.cpp @@ -17,7 +17,7 @@ #if LLVM_ENABLE_DIA_SDK #include "llvm/DebugInfo/PDB/DIA/DIASession.h" #endif -#include "llvm/DebugInfo/PDB/Raw/RawSession.h" +#include "llvm/DebugInfo/PDB/Native/NativeSession.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/ManagedStatic.h" @@ -28,7 +28,7 @@ Error llvm::pdb::loadDataForPDB(PDB_ReaderType Type, StringRef Path, std::unique_ptr &Session) { // Create the correct concrete instance type based on the value of Type. if (Type == PDB_ReaderType::Raw) - return RawSession::createFromPdb(Path, Session); + return NativeSession::createFromPdb(Path, Session); #if LLVM_ENABLE_DIA_SDK return DIASession::createFromPdb(Path, Session); @@ -41,7 +41,7 @@ Error llvm::pdb::loadDataForEXE(PDB_ReaderType Type, StringRef Path, std::unique_ptr &Session) { // Create the correct concrete instance type based on the value of Type. if (Type == PDB_ReaderType::Raw) - return RawSession::createFromExe(Path, Session); + return NativeSession::createFromExe(Path, Session); #if LLVM_ENABLE_DIA_SDK return DIASession::createFromExe(Path, Session); diff --git a/tools/llvm-pdbdump/LLVMOutputStyle.cpp b/tools/llvm-pdbdump/LLVMOutputStyle.cpp index 78a98724460..d0ea22ef94f 100644 --- a/tools/llvm-pdbdump/LLVMOutputStyle.cpp +++ b/tools/llvm-pdbdump/LLVMOutputStyle.cpp @@ -23,18 +23,18 @@ #include "llvm/DebugInfo/CodeView/TypeVisitorCallbackPipeline.h" #include "llvm/DebugInfo/MSF/MappedBlockStream.h" #include "llvm/DebugInfo/MSF/StreamReader.h" +#include "llvm/DebugInfo/PDB/Native/DbiStream.h" +#include "llvm/DebugInfo/PDB/Native/EnumTables.h" +#include "llvm/DebugInfo/PDB/Native/GlobalsStream.h" +#include "llvm/DebugInfo/PDB/Native/ISectionContribVisitor.h" +#include "llvm/DebugInfo/PDB/Native/InfoStream.h" +#include "llvm/DebugInfo/PDB/Native/ModInfo.h" +#include "llvm/DebugInfo/PDB/Native/ModStream.h" +#include "llvm/DebugInfo/PDB/Native/PDBFile.h" +#include "llvm/DebugInfo/PDB/Native/PublicsStream.h" +#include "llvm/DebugInfo/PDB/Native/RawError.h" +#include "llvm/DebugInfo/PDB/Native/TpiStream.h" #include "llvm/DebugInfo/PDB/PDBExtras.h" -#include "llvm/DebugInfo/PDB/Raw/DbiStream.h" -#include "llvm/DebugInfo/PDB/Raw/EnumTables.h" -#include "llvm/DebugInfo/PDB/Raw/GlobalsStream.h" -#include "llvm/DebugInfo/PDB/Raw/ISectionContribVisitor.h" -#include "llvm/DebugInfo/PDB/Raw/InfoStream.h" -#include "llvm/DebugInfo/PDB/Raw/ModInfo.h" -#include "llvm/DebugInfo/PDB/Raw/ModStream.h" -#include "llvm/DebugInfo/PDB/Raw/PDBFile.h" -#include "llvm/DebugInfo/PDB/Raw/PublicsStream.h" -#include "llvm/DebugInfo/PDB/Raw/RawError.h" -#include "llvm/DebugInfo/PDB/Raw/TpiStream.h" #include "llvm/Object/COFF.h" #include "llvm/Support/FormatVariadic.h" diff --git a/tools/llvm-pdbdump/PdbYaml.cpp b/tools/llvm-pdbdump/PdbYaml.cpp index 6a32080d29f..ba2acf7e7f1 100644 --- a/tools/llvm-pdbdump/PdbYaml.cpp +++ b/tools/llvm-pdbdump/PdbYaml.cpp @@ -20,10 +20,10 @@ #include "llvm/DebugInfo/CodeView/TypeDeserializer.h" #include "llvm/DebugInfo/CodeView/TypeSerializer.h" #include "llvm/DebugInfo/CodeView/TypeVisitorCallbackPipeline.h" +#include "llvm/DebugInfo/PDB/Native/PDBFile.h" +#include "llvm/DebugInfo/PDB/Native/TpiHashing.h" #include "llvm/DebugInfo/PDB/PDBExtras.h" #include "llvm/DebugInfo/PDB/PDBTypes.h" -#include "llvm/DebugInfo/PDB/Raw/PDBFile.h" -#include "llvm/DebugInfo/PDB/Raw/TpiHashing.h" using namespace llvm; using namespace llvm::pdb; diff --git a/tools/llvm-pdbdump/PdbYaml.h b/tools/llvm-pdbdump/PdbYaml.h index 4bb9e896dff..c5b49522b45 100644 --- a/tools/llvm-pdbdump/PdbYaml.h +++ b/tools/llvm-pdbdump/PdbYaml.h @@ -16,9 +16,9 @@ #include "llvm/DebugInfo/CodeView/SymbolRecord.h" #include "llvm/DebugInfo/CodeView/TypeRecord.h" #include "llvm/DebugInfo/MSF/MSFCommon.h" +#include "llvm/DebugInfo/PDB/Native/PDBFile.h" +#include "llvm/DebugInfo/PDB/Native/RawConstants.h" #include "llvm/DebugInfo/PDB/PDBTypes.h" -#include "llvm/DebugInfo/PDB/Raw/PDBFile.h" -#include "llvm/DebugInfo/PDB/Raw/RawConstants.h" #include "llvm/Support/Endian.h" #include "llvm/Support/YAMLTraits.h" diff --git a/tools/llvm-pdbdump/YAMLOutputStyle.cpp b/tools/llvm-pdbdump/YAMLOutputStyle.cpp index f7ad328ddc9..065a60d32a8 100644 --- a/tools/llvm-pdbdump/YAMLOutputStyle.cpp +++ b/tools/llvm-pdbdump/YAMLOutputStyle.cpp @@ -13,12 +13,12 @@ #include "llvm-pdbdump.h" #include "llvm/DebugInfo/MSF/MappedBlockStream.h" -#include "llvm/DebugInfo/PDB/Raw/DbiStream.h" -#include "llvm/DebugInfo/PDB/Raw/InfoStream.h" -#include "llvm/DebugInfo/PDB/Raw/ModStream.h" -#include "llvm/DebugInfo/PDB/Raw/PDBFile.h" -#include "llvm/DebugInfo/PDB/Raw/RawConstants.h" -#include "llvm/DebugInfo/PDB/Raw/TpiStream.h" +#include "llvm/DebugInfo/PDB/Native/DbiStream.h" +#include "llvm/DebugInfo/PDB/Native/InfoStream.h" +#include "llvm/DebugInfo/PDB/Native/ModStream.h" +#include "llvm/DebugInfo/PDB/Native/PDBFile.h" +#include "llvm/DebugInfo/PDB/Native/RawConstants.h" +#include "llvm/DebugInfo/PDB/Native/TpiStream.h" using namespace llvm; using namespace llvm::pdb; diff --git a/tools/llvm-pdbdump/YamlTypeDumper.cpp b/tools/llvm-pdbdump/YamlTypeDumper.cpp index 5c527c71c7e..80bf9349b0c 100644 --- a/tools/llvm-pdbdump/YamlTypeDumper.cpp +++ b/tools/llvm-pdbdump/YamlTypeDumper.cpp @@ -17,7 +17,7 @@ #include "llvm/DebugInfo/CodeView/TypeRecord.h" #include "llvm/DebugInfo/CodeView/TypeSerializer.h" #include "llvm/DebugInfo/CodeView/TypeVisitorCallbackPipeline.h" -#include "llvm/DebugInfo/PDB/Raw/TpiHashing.h" +#include "llvm/DebugInfo/PDB/Native/TpiHashing.h" using namespace llvm; using namespace llvm::codeview; diff --git a/tools/llvm-pdbdump/llvm-pdbdump.cpp b/tools/llvm-pdbdump/llvm-pdbdump.cpp index ccab7fe47b4..07ac65e2675 100644 --- a/tools/llvm-pdbdump/llvm-pdbdump.cpp +++ b/tools/llvm-pdbdump/llvm-pdbdump.cpp @@ -35,24 +35,24 @@ #include "llvm/DebugInfo/PDB/IPDBEnumChildren.h" #include "llvm/DebugInfo/PDB/IPDBRawSymbol.h" #include "llvm/DebugInfo/PDB/IPDBSession.h" +#include "llvm/DebugInfo/PDB/Native/DbiStream.h" +#include "llvm/DebugInfo/PDB/Native/DbiStreamBuilder.h" +#include "llvm/DebugInfo/PDB/Native/InfoStream.h" +#include "llvm/DebugInfo/PDB/Native/InfoStreamBuilder.h" +#include "llvm/DebugInfo/PDB/Native/NativeSession.h" +#include "llvm/DebugInfo/PDB/Native/PDBFile.h" +#include "llvm/DebugInfo/PDB/Native/PDBFileBuilder.h" +#include "llvm/DebugInfo/PDB/Native/RawConstants.h" +#include "llvm/DebugInfo/PDB/Native/RawError.h" +#include "llvm/DebugInfo/PDB/Native/StringTableBuilder.h" +#include "llvm/DebugInfo/PDB/Native/TpiStream.h" +#include "llvm/DebugInfo/PDB/Native/TpiStreamBuilder.h" #include "llvm/DebugInfo/PDB/PDB.h" #include "llvm/DebugInfo/PDB/PDBSymbolCompiland.h" #include "llvm/DebugInfo/PDB/PDBSymbolData.h" #include "llvm/DebugInfo/PDB/PDBSymbolExe.h" #include "llvm/DebugInfo/PDB/PDBSymbolFunc.h" #include "llvm/DebugInfo/PDB/PDBSymbolThunk.h" -#include "llvm/DebugInfo/PDB/Raw/DbiStream.h" -#include "llvm/DebugInfo/PDB/Raw/DbiStreamBuilder.h" -#include "llvm/DebugInfo/PDB/Raw/InfoStream.h" -#include "llvm/DebugInfo/PDB/Raw/InfoStreamBuilder.h" -#include "llvm/DebugInfo/PDB/Raw/PDBFile.h" -#include "llvm/DebugInfo/PDB/Raw/PDBFileBuilder.h" -#include "llvm/DebugInfo/PDB/Raw/RawConstants.h" -#include "llvm/DebugInfo/PDB/Raw/RawError.h" -#include "llvm/DebugInfo/PDB/Raw/RawSession.h" -#include "llvm/DebugInfo/PDB/Raw/StringTableBuilder.h" -#include "llvm/DebugInfo/PDB/Raw/TpiStream.h" -#include "llvm/DebugInfo/PDB/Raw/TpiStreamBuilder.h" #include "llvm/Support/COM.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/ConvertUTF.h" @@ -404,7 +404,7 @@ static void pdb2Yaml(StringRef Path) { std::unique_ptr Session; ExitOnErr(loadDataForPDB(PDB_ReaderType::Raw, Path, Session)); - RawSession *RS = static_cast(Session.get()); + NativeSession *RS = static_cast(Session.get()); PDBFile &File = RS->getPDBFile(); auto O = llvm::make_unique(File); O = llvm::make_unique(File); @@ -416,7 +416,7 @@ static void dumpRaw(StringRef Path) { std::unique_ptr Session; ExitOnErr(loadDataForPDB(PDB_ReaderType::Raw, Path, Session)); - RawSession *RS = static_cast(Session.get()); + NativeSession *RS = static_cast(Session.get()); PDBFile &File = RS->getPDBFile(); auto O = llvm::make_unique(File);