1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00

NFC: Rename (PDB) RawSession to NativeSession

This eliminates one overload on the term Raw.

Differential Revision: https://reviews.llvm.org/D29098

llvm-svn: 293104
This commit is contained in:
Adrian McCarthy 2017-01-25 22:38:55 +00:00
parent 83efd3d61d
commit 9129f5b21a
58 changed files with 265 additions and 253 deletions

View File

@ -14,11 +14,11 @@
#include "llvm/DebugInfo/MSF/MappedBlockStream.h" #include "llvm/DebugInfo/MSF/MappedBlockStream.h"
#include "llvm/DebugInfo/MSF/StreamArray.h" #include "llvm/DebugInfo/MSF/StreamArray.h"
#include "llvm/DebugInfo/MSF/StreamRef.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/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/Endian.h"
#include "llvm/Support/Error.h" #include "llvm/Support/Error.h"

View File

@ -16,9 +16,9 @@
#include "llvm/DebugInfo/MSF/ByteStream.h" #include "llvm/DebugInfo/MSF/ByteStream.h"
#include "llvm/DebugInfo/MSF/StreamReader.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/PDBTypes.h"
#include "llvm/DebugInfo/PDB/Raw/PDBFile.h"
#include "llvm/DebugInfo/PDB/Raw/RawConstants.h"
#include "llvm/Support/Endian.h" #include "llvm/Support/Endian.h"
namespace llvm { namespace llvm {
@ -60,8 +60,7 @@ public:
Error finalizeMsfLayout(); Error finalizeMsfLayout();
Error commit(const msf::MSFLayout &Layout, Error commit(const msf::MSFLayout &Layout, const msf::WritableStream &Buffer);
const msf::WritableStream &Buffer);
// A helper function to create Section Contributions from COFF input // A helper function to create Section Contributions from COFF input
// section headers. // section headers.

View File

@ -12,9 +12,9 @@
#include "llvm/DebugInfo/MSF/MappedBlockStream.h" #include "llvm/DebugInfo/MSF/MappedBlockStream.h"
#include "llvm/DebugInfo/MSF/StreamArray.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/PDBTypes.h"
#include "llvm/DebugInfo/PDB/Raw/RawConstants.h"
#include "llvm/DebugInfo/PDB/Raw/RawTypes.h"
#include "llvm/Support/Error.h" #include "llvm/Support/Error.h"
namespace llvm { namespace llvm {

View File

@ -12,9 +12,9 @@
#include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringMap.h"
#include "llvm/DebugInfo/MSF/MappedBlockStream.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/PDBTypes.h"
#include "llvm/DebugInfo/PDB/Raw/NamedStreamMap.h"
#include "llvm/DebugInfo/PDB/Raw/RawConstants.h"
#include "llvm/Support/Endian.h" #include "llvm/Support/Endian.h"
#include "llvm/Support/Error.h" #include "llvm/Support/Error.h"

View File

@ -13,10 +13,10 @@
#include "llvm/ADT/Optional.h" #include "llvm/ADT/Optional.h"
#include "llvm/Support/Error.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/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 llvm {
namespace msf { namespace msf {

View File

@ -13,7 +13,7 @@
#include "llvm/ADT/StringRef.h" #include "llvm/ADT/StringRef.h"
#include "llvm/DebugInfo/MSF/StreamArray.h" #include "llvm/DebugInfo/MSF/StreamArray.h"
#include "llvm/DebugInfo/MSF/StreamRef.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 "llvm/Support/Error.h"
#include <cstdint> #include <cstdint>
#include <vector> #include <vector>

View File

@ -12,7 +12,7 @@
#include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.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 "llvm/Support/Error.h"
#include <cstdint> #include <cstdint>

View File

@ -1,4 +1,4 @@
//===- RawSession.h - Native implementation of IPDBSession ------*- C++ -*-===// //===- NativeSession.h - Native implementation of IPDBSession ---*- C++ -*-===//
// //
// The LLVM Compiler Infrastructure // The LLVM Compiler Infrastructure
// //
@ -19,11 +19,11 @@ namespace llvm {
namespace pdb { namespace pdb {
class PDBFile; class PDBFile;
class RawSession : public IPDBSession { class NativeSession : public IPDBSession {
public: public:
RawSession(std::unique_ptr<PDBFile> PdbFile, NativeSession(std::unique_ptr<PDBFile> PdbFile,
std::unique_ptr<BumpPtrAllocator> Allocator); std::unique_ptr<BumpPtrAllocator> Allocator);
~RawSession() override; ~NativeSession() override;
static Error createFromPdb(StringRef Path, static Error createFromPdb(StringRef Path,
std::unique_ptr<IPDBSession> &Session); std::unique_ptr<IPDBSession> &Session);

View File

@ -104,10 +104,11 @@ public:
bool hasPDBTpiStream() const; bool hasPDBTpiStream() const;
bool hasStringTable(); bool hasStringTable();
private: private:
Expected<std::unique_ptr<msf::MappedBlockStream>> safelyCreateIndexedStream( Expected<std::unique_ptr<msf::MappedBlockStream>>
const msf::MSFLayout &Layout, const msf::ReadableStream &MsfData, safelyCreateIndexedStream(const msf::MSFLayout &Layout,
uint32_t StreamIndex) const; const msf::ReadableStream &MsfData,
uint32_t StreamIndex) const;
BumpPtrAllocator &Allocator; BumpPtrAllocator &Allocator;

View File

@ -13,10 +13,10 @@
#include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/BitVector.h" #include "llvm/ADT/BitVector.h"
#include "llvm/ADT/Optional.h" #include "llvm/ADT/Optional.h"
#include "llvm/DebugInfo/PDB/Raw/NamedStreamMap.h" #include "llvm/DebugInfo/PDB/Native/NamedStreamMap.h"
#include "llvm/DebugInfo/PDB/Raw/PDBFile.h" #include "llvm/DebugInfo/PDB/Native/PDBFile.h"
#include "llvm/DebugInfo/PDB/Raw/RawConstants.h" #include "llvm/DebugInfo/PDB/Native/RawConstants.h"
#include "llvm/DebugInfo/PDB/Raw/StringTableBuilder.h" #include "llvm/DebugInfo/PDB/Native/StringTableBuilder.h"
#include "llvm/Support/Allocator.h" #include "llvm/Support/Allocator.h"
#include "llvm/Support/Endian.h" #include "llvm/Support/Endian.h"
#include "llvm/Support/Error.h" #include "llvm/Support/Error.h"

View File

@ -13,9 +13,9 @@
#include "llvm/DebugInfo/CodeView/SymbolRecord.h" #include "llvm/DebugInfo/CodeView/SymbolRecord.h"
#include "llvm/DebugInfo/MSF/MappedBlockStream.h" #include "llvm/DebugInfo/MSF/MappedBlockStream.h"
#include "llvm/DebugInfo/MSF/StreamArray.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/PDBTypes.h"
#include "llvm/DebugInfo/PDB/Raw/RawConstants.h"
#include "llvm/DebugInfo/PDB/Raw/RawTypes.h"
#include "llvm/Support/Error.h" #include "llvm/Support/Error.h"

View File

@ -16,7 +16,7 @@
#include "llvm/DebugInfo/CodeView/TypeRecord.h" #include "llvm/DebugInfo/CodeView/TypeRecord.h"
#include "llvm/DebugInfo/CodeView/TypeVisitorCallbacks.h" #include "llvm/DebugInfo/CodeView/TypeVisitorCallbacks.h"
#include "llvm/DebugInfo/MSF/StreamArray.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/Endian.h"
#include "llvm/Support/Error.h" #include "llvm/Support/Error.h"
#include <cstdint> #include <cstdint>

View File

@ -12,10 +12,10 @@
#include "llvm/DebugInfo/CodeView/TypeRecord.h" #include "llvm/DebugInfo/CodeView/TypeRecord.h"
#include "llvm/DebugInfo/MSF/StreamArray.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/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/raw_ostream.h"
#include "llvm/Support/Error.h" #include "llvm/Support/Error.h"

View File

@ -14,7 +14,7 @@
#include "llvm/DebugInfo/CodeView/TypeRecord.h" #include "llvm/DebugInfo/CodeView/TypeRecord.h"
#include "llvm/DebugInfo/MSF/ByteStream.h" #include "llvm/DebugInfo/MSF/ByteStream.h"
#include "llvm/DebugInfo/MSF/SequencedItemStream.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/Allocator.h"
#include "llvm/Support/Error.h" #include "llvm/Support/Error.h"

View File

@ -12,7 +12,7 @@
#include "llvm/Config/llvm-config.h" #include "llvm/Config/llvm-config.h"
#include "llvm/DebugInfo/CodeView/CodeView.h" #include "llvm/DebugInfo/CodeView/CodeView.h"
#include "llvm/DebugInfo/PDB/Raw/RawTypes.h" #include "llvm/DebugInfo/PDB/Native/RawTypes.h"
#include <cstdint> #include <cstdint>
#include <cstring> #include <cstring>
#include <functional> #include <functional>

View File

@ -27,32 +27,32 @@ if(LLVM_ENABLE_DIA_SDK)
set(LIBPDB_ADDITIONAL_HEADER_DIRS "${LLVM_MAIN_INCLUDE_DIR}/llvm/DebugInfo/PDB/DIA") set(LIBPDB_ADDITIONAL_HEADER_DIRS "${LLVM_MAIN_INCLUDE_DIR}/llvm/DebugInfo/PDB/DIA")
endif() endif()
add_pdb_impl_folder(Raw add_pdb_impl_folder(Native
Raw/DbiStream.cpp Native/DbiStream.cpp
Raw/DbiStreamBuilder.cpp Native/DbiStreamBuilder.cpp
Raw/EnumTables.cpp Native/EnumTables.cpp
Raw/GlobalsStream.cpp Native/GlobalsStream.cpp
Raw/GSI.cpp Native/GSI.cpp
Raw/Hash.cpp Native/Hash.cpp
Raw/HashTable.cpp Native/HashTable.cpp
Raw/InfoStream.cpp Native/InfoStream.cpp
Raw/InfoStreamBuilder.cpp Native/InfoStreamBuilder.cpp
Raw/ModInfo.cpp Native/ModInfo.cpp
Raw/ModStream.cpp Native/ModStream.cpp
Raw/NamedStreamMap.cpp Native/NamedStreamMap.cpp
Raw/PDBFile.cpp Native/NativeSession.cpp
Raw/PDBFileBuilder.cpp Native/PDBFile.cpp
Raw/PublicsStream.cpp Native/PDBFileBuilder.cpp
Raw/RawError.cpp Native/PublicsStream.cpp
Raw/RawSession.cpp Native/RawError.cpp
Raw/StringTable.cpp Native/StringTable.cpp
Raw/StringTableBuilder.cpp Native/StringTableBuilder.cpp
Raw/SymbolStream.cpp Native/SymbolStream.cpp
Raw/TpiHashing.cpp Native/TpiHashing.cpp
Raw/TpiStream.cpp Native/TpiStream.cpp
Raw/TpiStreamBuilder.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") list(APPEND LIBPDB_ADDITIONAL_HEADER_DIRS "${LLVM_MAIN_INCLUDE_DIR}/llvm/DebugInfo/PDB")
add_llvm_library(LLVMDebugInfoPDB add_llvm_library(LLVMDebugInfoPDB

View File

@ -7,19 +7,19 @@
// //
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
#include "llvm/DebugInfo/PDB/Native/DbiStream.h"
#include "llvm/ADT/StringRef.h" #include "llvm/ADT/StringRef.h"
#include "llvm/DebugInfo/MSF/MappedBlockStream.h" #include "llvm/DebugInfo/MSF/MappedBlockStream.h"
#include "llvm/DebugInfo/MSF/StreamArray.h" #include "llvm/DebugInfo/MSF/StreamArray.h"
#include "llvm/DebugInfo/MSF/StreamReader.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/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/Object/COFF.h"
#include "llvm/Support/Error.h" #include "llvm/Support/Error.h"
#include <algorithm> #include <algorithm>
@ -47,8 +47,7 @@ static Error loadSectionContribs(FixedStreamArray<ContribType> &Output,
} }
DbiStream::DbiStream(PDBFile &File, std::unique_ptr<MappedBlockStream> Stream) DbiStream::DbiStream(PDBFile &File, std::unique_ptr<MappedBlockStream> Stream)
: Pdb(File), Stream(std::move(Stream)), Header(nullptr) { : Pdb(File), Stream(std::move(Stream)), Header(nullptr) {}
}
DbiStream::~DbiStream() = default; DbiStream::~DbiStream() = default;
@ -126,8 +125,8 @@ Error DbiStream::reload() {
return EC; return EC;
if (auto EC = Reader.readStreamRef(ECSubstream, Header->ECSubstreamSize)) if (auto EC = Reader.readStreamRef(ECSubstream, Header->ECSubstreamSize))
return EC; return EC;
if (auto EC = Reader.readArray(DbgStreams, Header->OptionalDbgHdrSize / if (auto EC = Reader.readArray(
sizeof(ulittle16_t))) DbgStreams, Header->OptionalDbgHdrSize / sizeof(ulittle16_t)))
return EC; return EC;
if (auto EC = initializeSectionContributionData()) if (auto EC = initializeSectionContributionData())

View File

@ -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/ADT/ArrayRef.h"
#include "llvm/DebugInfo/MSF/MSFBuilder.h" #include "llvm/DebugInfo/MSF/MSFBuilder.h"
#include "llvm/DebugInfo/MSF/MappedBlockStream.h" #include "llvm/DebugInfo/MSF/MappedBlockStream.h"
#include "llvm/DebugInfo/MSF/StreamWriter.h" #include "llvm/DebugInfo/MSF/StreamWriter.h"
#include "llvm/DebugInfo/PDB/Raw/DbiStream.h" #include "llvm/DebugInfo/PDB/Native/DbiStream.h"
#include "llvm/DebugInfo/PDB/Raw/RawError.h" #include "llvm/DebugInfo/PDB/Native/RawError.h"
#include "llvm/Object/COFF.h" #include "llvm/Object/COFF.h"
#include "llvm/Support/COFF.h" #include "llvm/Support/COFF.h"

View File

@ -7,8 +7,8 @@
// //
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
#include "llvm/DebugInfo/PDB/Raw/EnumTables.h" #include "llvm/DebugInfo/PDB/Native/EnumTables.h"
#include "llvm/DebugInfo/PDB/Raw/RawConstants.h" #include "llvm/DebugInfo/PDB/Native/RawConstants.h"
using namespace llvm; using namespace llvm;
using namespace llvm::pdb; using namespace llvm::pdb;

View File

@ -11,8 +11,8 @@
#include "llvm/DebugInfo/MSF/StreamArray.h" #include "llvm/DebugInfo/MSF/StreamArray.h"
#include "llvm/DebugInfo/MSF/StreamReader.h" #include "llvm/DebugInfo/MSF/StreamReader.h"
#include "llvm/DebugInfo/PDB/Raw/RawError.h" #include "llvm/DebugInfo/PDB/Native/RawError.h"
#include "llvm/DebugInfo/PDB/Raw/RawTypes.h" #include "llvm/DebugInfo/PDB/Native/RawTypes.h"
#include "llvm/Support/Error.h" #include "llvm/Support/Error.h"

View File

@ -26,7 +26,7 @@
#define LLVM_LIB_DEBUGINFO_PDB_RAW_GSI_H #define LLVM_LIB_DEBUGINFO_PDB_RAW_GSI_H
#include "llvm/DebugInfo/MSF/StreamArray.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/Endian.h"
#include "llvm/Support/Error.h" #include "llvm/Support/Error.h"

View File

@ -7,9 +7,9 @@
// //
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
#include "llvm/DebugInfo/PDB/Native/GlobalsStream.h"
#include "GSI.h" #include "GSI.h"
#include "llvm/DebugInfo/MSF/StreamReader.h" #include "llvm/DebugInfo/MSF/StreamReader.h"
#include "llvm/DebugInfo/PDB/Raw/GlobalsStream.h"
#include "llvm/Support/Error.h" #include "llvm/Support/Error.h"
#include <algorithm> #include <algorithm>

View File

@ -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/ADT/ArrayRef.h"
#include "llvm/Support/Endian.h" #include "llvm/Support/Endian.h"

View File

@ -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/Optional.h"
#include "llvm/ADT/SparseBitVector.h" #include "llvm/ADT/SparseBitVector.h"
#include "llvm/DebugInfo/PDB/Raw/RawError.h" #include "llvm/DebugInfo/PDB/Native/RawError.h"
#include <assert.h> #include <assert.h>

View File

@ -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/BitVector.h"
#include "llvm/ADT/SmallVector.h" #include "llvm/ADT/SmallVector.h"
#include "llvm/DebugInfo/MSF/StreamReader.h" #include "llvm/DebugInfo/MSF/StreamReader.h"
#include "llvm/DebugInfo/MSF/StreamWriter.h" #include "llvm/DebugInfo/MSF/StreamWriter.h"
#include "llvm/DebugInfo/PDB/Raw/PDBFile.h" #include "llvm/DebugInfo/PDB/Native/PDBFile.h"
#include "llvm/DebugInfo/PDB/Raw/RawConstants.h" #include "llvm/DebugInfo/PDB/Native/RawConstants.h"
#include "llvm/DebugInfo/PDB/Raw/RawError.h" #include "llvm/DebugInfo/PDB/Native/RawError.h"
#include "llvm/DebugInfo/PDB/Raw/RawTypes.h" #include "llvm/DebugInfo/PDB/Native/RawTypes.h"
using namespace llvm; using namespace llvm;
using namespace llvm::codeview; using namespace llvm::codeview;

View File

@ -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/MSFBuilder.h"
#include "llvm/DebugInfo/MSF/MappedBlockStream.h" #include "llvm/DebugInfo/MSF/MappedBlockStream.h"
#include "llvm/DebugInfo/MSF/StreamWriter.h" #include "llvm/DebugInfo/MSF/StreamWriter.h"
#include "llvm/DebugInfo/PDB/Raw/InfoStream.h" #include "llvm/DebugInfo/PDB/Native/InfoStream.h"
#include "llvm/DebugInfo/PDB/Raw/NamedStreamMap.h" #include "llvm/DebugInfo/PDB/Native/NamedStreamMap.h"
#include "llvm/DebugInfo/PDB/Raw/PDBFileBuilder.h" #include "llvm/DebugInfo/PDB/Native/PDBFileBuilder.h"
#include "llvm/DebugInfo/PDB/Raw/RawError.h" #include "llvm/DebugInfo/PDB/Native/RawError.h"
#include "llvm/DebugInfo/PDB/Raw/RawTypes.h" #include "llvm/DebugInfo/PDB/Native/RawTypes.h"
using namespace llvm; using namespace llvm;
using namespace llvm::codeview; using namespace llvm::codeview;

View File

@ -7,9 +7,9 @@
// //
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
#include "llvm/DebugInfo/PDB/Native/ModInfo.h"
#include "llvm/DebugInfo/MSF/StreamReader.h" #include "llvm/DebugInfo/MSF/StreamReader.h"
#include "llvm/DebugInfo/PDB/Raw/ModInfo.h" #include "llvm/DebugInfo/PDB/Native/RawTypes.h"
#include "llvm/DebugInfo/PDB/Raw/RawTypes.h"
#include "llvm/Support/Endian.h" #include "llvm/Support/Endian.h"
#include "llvm/Support/Error.h" #include "llvm/Support/Error.h"
#include "llvm/Support/MathExtras.h" #include "llvm/Support/MathExtras.h"

View File

@ -7,15 +7,15 @@
// //
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
#include "llvm/DebugInfo/PDB/Native/ModStream.h"
#include "llvm/ADT/iterator_range.h" #include "llvm/ADT/iterator_range.h"
#include "llvm/DebugInfo/CodeView/SymbolRecord.h" #include "llvm/DebugInfo/CodeView/SymbolRecord.h"
#include "llvm/DebugInfo/MSF/StreamReader.h" #include "llvm/DebugInfo/MSF/StreamReader.h"
#include "llvm/DebugInfo/MSF/StreamRef.h" #include "llvm/DebugInfo/MSF/StreamRef.h"
#include "llvm/DebugInfo/PDB/Raw/ModInfo.h" #include "llvm/DebugInfo/PDB/Native/ModInfo.h"
#include "llvm/DebugInfo/PDB/Raw/ModStream.h" #include "llvm/DebugInfo/PDB/Native/PDBFile.h"
#include "llvm/DebugInfo/PDB/Raw/PDBFile.h" #include "llvm/DebugInfo/PDB/Native/RawError.h"
#include "llvm/DebugInfo/PDB/Raw/RawError.h" #include "llvm/DebugInfo/PDB/Native/RawTypes.h"
#include "llvm/DebugInfo/PDB/Raw/RawTypes.h"
#include "llvm/Support/Error.h" #include "llvm/Support/Error.h"
#include <algorithm> #include <algorithm>
#include <cstdint> #include <cstdint>

View File

@ -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/SparseBitVector.h"
#include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h" #include "llvm/ADT/StringRef.h"
#include "llvm/ADT/iterator_range.h" #include "llvm/ADT/iterator_range.h"
#include "llvm/DebugInfo/MSF/StreamReader.h" #include "llvm/DebugInfo/MSF/StreamReader.h"
#include "llvm/DebugInfo/PDB/Raw/HashTable.h" #include "llvm/DebugInfo/PDB/Native/HashTable.h"
#include "llvm/DebugInfo/PDB/Raw/RawError.h" #include "llvm/DebugInfo/PDB/Native/RawError.h"
#include "llvm/Support/Error.h" #include "llvm/Support/Error.h"
#include <algorithm> #include <algorithm>
#include <cstdint> #include <cstdint>

View File

@ -1,4 +1,4 @@
//===- RawSession.cpp - Raw implementation of IPDBSession -------*- C++ -*-===// //===- NativeSession.cpp - Native implementation of IPDBSession -*- C++ -*-===//
// //
// The LLVM Compiler Infrastructure // The LLVM Compiler Infrastructure
// //
@ -7,16 +7,17 @@
// //
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
#include "llvm/DebugInfo/PDB/Native/NativeSession.h"
#include "llvm/ADT/STLExtras.h" #include "llvm/ADT/STLExtras.h"
#include "llvm/DebugInfo/MSF/ByteStream.h" #include "llvm/DebugInfo/MSF/ByteStream.h"
#include "llvm/DebugInfo/PDB/GenericError.h" #include "llvm/DebugInfo/PDB/GenericError.h"
#include "llvm/DebugInfo/PDB/IPDBEnumChildren.h" #include "llvm/DebugInfo/PDB/IPDBEnumChildren.h"
#include "llvm/DebugInfo/PDB/IPDBSourceFile.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/PDBSymbolCompiland.h"
#include "llvm/DebugInfo/PDB/PDBSymbolExe.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/Allocator.h"
#include "llvm/Support/Error.h" #include "llvm/Support/Error.h"
#include "llvm/Support/ErrorOr.h" #include "llvm/Support/ErrorOr.h"
@ -28,14 +29,14 @@ using namespace llvm;
using namespace llvm::msf; using namespace llvm::msf;
using namespace llvm::pdb; using namespace llvm::pdb;
RawSession::RawSession(std::unique_ptr<PDBFile> PdbFile, NativeSession::NativeSession(std::unique_ptr<PDBFile> PdbFile,
std::unique_ptr<BumpPtrAllocator> Allocator) std::unique_ptr<BumpPtrAllocator> Allocator)
: Pdb(std::move(PdbFile)), Allocator(std::move(Allocator)) {} : Pdb(std::move(PdbFile)), Allocator(std::move(Allocator)) {}
RawSession::~RawSession() = default; NativeSession::~NativeSession() = default;
Error RawSession::createFromPdb(StringRef Path, Error NativeSession::createFromPdb(StringRef Path,
std::unique_ptr<IPDBSession> &Session) { std::unique_ptr<IPDBSession> &Session) {
ErrorOr<std::unique_ptr<MemoryBuffer>> ErrorOrBuffer = ErrorOr<std::unique_ptr<MemoryBuffer>> ErrorOrBuffer =
MemoryBuffer::getFileOrSTDIN(Path, /*FileSize=*/-1, MemoryBuffer::getFileOrSTDIN(Path, /*FileSize=*/-1,
/*RequiresNullTerminator=*/false); /*RequiresNullTerminator=*/false);
@ -53,84 +54,86 @@ Error RawSession::createFromPdb(StringRef Path,
return EC; return EC;
Session = Session =
llvm::make_unique<RawSession>(std::move(File), std::move(Allocator)); llvm::make_unique<NativeSession>(std::move(File), std::move(Allocator));
return Error::success(); return Error::success();
} }
Error RawSession::createFromExe(StringRef Path, Error NativeSession::createFromExe(StringRef Path,
std::unique_ptr<IPDBSession> &Session) { std::unique_ptr<IPDBSession> &Session) {
return make_error<RawError>(raw_error_code::feature_unsupported); return make_error<RawError>(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<PDBSymbolExe> RawSession::getGlobalScope() const { std::unique_ptr<PDBSymbolExe> NativeSession::getGlobalScope() const {
return nullptr;
}
std::unique_ptr<PDBSymbol> RawSession::getSymbolById(uint32_t SymbolId) const {
return nullptr; return nullptr;
} }
std::unique_ptr<PDBSymbol> std::unique_ptr<PDBSymbol>
RawSession::findSymbolByAddress(uint64_t Address, PDB_SymType Type) const { NativeSession::getSymbolById(uint32_t SymbolId) const {
return nullptr;
}
std::unique_ptr<PDBSymbol>
NativeSession::findSymbolByAddress(uint64_t Address, PDB_SymType Type) const {
return nullptr; return nullptr;
} }
std::unique_ptr<IPDBEnumLineNumbers> std::unique_ptr<IPDBEnumLineNumbers>
RawSession::findLineNumbers(const PDBSymbolCompiland &Compiland, NativeSession::findLineNumbers(const PDBSymbolCompiland &Compiland,
const IPDBSourceFile &File) const { const IPDBSourceFile &File) const {
return nullptr; return nullptr;
} }
std::unique_ptr<IPDBEnumLineNumbers> std::unique_ptr<IPDBEnumLineNumbers>
RawSession::findLineNumbersByAddress(uint64_t Address, uint32_t Length) const { NativeSession::findLineNumbersByAddress(uint64_t Address,
uint32_t Length) const {
return nullptr; return nullptr;
} }
std::unique_ptr<IPDBEnumSourceFiles> std::unique_ptr<IPDBEnumSourceFiles>
RawSession::findSourceFiles(const PDBSymbolCompiland *Compiland, NativeSession::findSourceFiles(const PDBSymbolCompiland *Compiland,
StringRef Pattern, StringRef Pattern,
PDB_NameSearchFlags Flags) const { PDB_NameSearchFlags Flags) const {
return nullptr; return nullptr;
} }
std::unique_ptr<IPDBSourceFile> std::unique_ptr<IPDBSourceFile>
RawSession::findOneSourceFile(const PDBSymbolCompiland *Compiland, NativeSession::findOneSourceFile(const PDBSymbolCompiland *Compiland,
StringRef Pattern, StringRef Pattern,
PDB_NameSearchFlags Flags) const { PDB_NameSearchFlags Flags) const {
return nullptr; return nullptr;
} }
std::unique_ptr<IPDBEnumChildren<PDBSymbolCompiland>> std::unique_ptr<IPDBEnumChildren<PDBSymbolCompiland>>
RawSession::findCompilandsForSourceFile(StringRef Pattern, NativeSession::findCompilandsForSourceFile(StringRef Pattern,
PDB_NameSearchFlags Flags) const { PDB_NameSearchFlags Flags) const {
return nullptr; return nullptr;
} }
std::unique_ptr<PDBSymbolCompiland> std::unique_ptr<PDBSymbolCompiland>
RawSession::findOneCompilandForSourceFile(StringRef Pattern, NativeSession::findOneCompilandForSourceFile(StringRef Pattern,
PDB_NameSearchFlags Flags) const { PDB_NameSearchFlags Flags) const {
return nullptr; return nullptr;
} }
std::unique_ptr<IPDBEnumSourceFiles> RawSession::getAllSourceFiles() const { std::unique_ptr<IPDBEnumSourceFiles> NativeSession::getAllSourceFiles() const {
return nullptr; return nullptr;
} }
std::unique_ptr<IPDBEnumSourceFiles> RawSession::getSourceFilesForCompiland( std::unique_ptr<IPDBEnumSourceFiles> NativeSession::getSourceFilesForCompiland(
const PDBSymbolCompiland &Compiland) const { const PDBSymbolCompiland &Compiland) const {
return nullptr; return nullptr;
} }
std::unique_ptr<IPDBSourceFile> std::unique_ptr<IPDBSourceFile>
RawSession::getSourceFileById(uint32_t FileId) const { NativeSession::getSourceFileById(uint32_t FileId) const {
return nullptr; return nullptr;
} }
std::unique_ptr<IPDBEnumDataStreams> RawSession::getDebugStreams() const { std::unique_ptr<IPDBEnumDataStreams> NativeSession::getDebugStreams() const {
return nullptr; return nullptr;
} }

View File

@ -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/ArrayRef.h"
#include "llvm/ADT/STLExtras.h" #include "llvm/ADT/STLExtras.h"
#include "llvm/DebugInfo/MSF/MSFCommon.h" #include "llvm/DebugInfo/MSF/MSFCommon.h"
@ -15,14 +15,14 @@
#include "llvm/DebugInfo/MSF/StreamArray.h" #include "llvm/DebugInfo/MSF/StreamArray.h"
#include "llvm/DebugInfo/MSF/StreamInterface.h" #include "llvm/DebugInfo/MSF/StreamInterface.h"
#include "llvm/DebugInfo/MSF/StreamReader.h" #include "llvm/DebugInfo/MSF/StreamReader.h"
#include "llvm/DebugInfo/PDB/Raw/DbiStream.h" #include "llvm/DebugInfo/PDB/Native/DbiStream.h"
#include "llvm/DebugInfo/PDB/Raw/GlobalsStream.h" #include "llvm/DebugInfo/PDB/Native/GlobalsStream.h"
#include "llvm/DebugInfo/PDB/Raw/InfoStream.h" #include "llvm/DebugInfo/PDB/Native/InfoStream.h"
#include "llvm/DebugInfo/PDB/Raw/PublicsStream.h" #include "llvm/DebugInfo/PDB/Native/PublicsStream.h"
#include "llvm/DebugInfo/PDB/Raw/RawError.h" #include "llvm/DebugInfo/PDB/Native/RawError.h"
#include "llvm/DebugInfo/PDB/Raw/StringTable.h" #include "llvm/DebugInfo/PDB/Native/StringTable.h"
#include "llvm/DebugInfo/PDB/Raw/SymbolStream.h" #include "llvm/DebugInfo/PDB/Native/SymbolStream.h"
#include "llvm/DebugInfo/PDB/Raw/TpiStream.h" #include "llvm/DebugInfo/PDB/Native/TpiStream.h"
#include "llvm/Support/Endian.h" #include "llvm/Support/Endian.h"
#include "llvm/Support/Error.h" #include "llvm/Support/Error.h"
#include <algorithm> #include <algorithm>
@ -229,7 +229,8 @@ Expected<GlobalsStream &> PDBFile::getPDBGlobalsStream() {
auto GlobalS = safelyCreateIndexedStream( auto GlobalS = safelyCreateIndexedStream(
ContainerLayout, *Buffer, DbiS->getGlobalSymbolStreamIndex()); ContainerLayout, *Buffer, DbiS->getGlobalSymbolStreamIndex());
if (!GlobalS) return GlobalS.takeError(); if (!GlobalS)
return GlobalS.takeError();
auto TempGlobals = llvm::make_unique<GlobalsStream>(std::move(*GlobalS)); auto TempGlobals = llvm::make_unique<GlobalsStream>(std::move(*GlobalS));
if (auto EC = TempGlobals->reload()) if (auto EC = TempGlobals->reload())
return std::move(EC); return std::move(EC);
@ -241,7 +242,8 @@ Expected<GlobalsStream &> PDBFile::getPDBGlobalsStream() {
Expected<InfoStream &> PDBFile::getPDBInfoStream() { Expected<InfoStream &> PDBFile::getPDBInfoStream() {
if (!Info) { if (!Info) {
auto InfoS = safelyCreateIndexedStream(ContainerLayout, *Buffer, StreamPDB); auto InfoS = safelyCreateIndexedStream(ContainerLayout, *Buffer, StreamPDB);
if (!InfoS) return InfoS.takeError(); if (!InfoS)
return InfoS.takeError();
auto TempInfo = llvm::make_unique<InfoStream>(std::move(*InfoS)); auto TempInfo = llvm::make_unique<InfoStream>(std::move(*InfoS));
if (auto EC = TempInfo->reload()) if (auto EC = TempInfo->reload())
return std::move(EC); return std::move(EC);
@ -253,7 +255,8 @@ Expected<InfoStream &> PDBFile::getPDBInfoStream() {
Expected<DbiStream &> PDBFile::getPDBDbiStream() { Expected<DbiStream &> PDBFile::getPDBDbiStream() {
if (!Dbi) { if (!Dbi) {
auto DbiS = safelyCreateIndexedStream(ContainerLayout, *Buffer, StreamDBI); auto DbiS = safelyCreateIndexedStream(ContainerLayout, *Buffer, StreamDBI);
if (!DbiS) return DbiS.takeError(); if (!DbiS)
return DbiS.takeError();
auto TempDbi = llvm::make_unique<DbiStream>(*this, std::move(*DbiS)); auto TempDbi = llvm::make_unique<DbiStream>(*this, std::move(*DbiS));
if (auto EC = TempDbi->reload()) if (auto EC = TempDbi->reload())
return std::move(EC); return std::move(EC);
@ -265,7 +268,8 @@ Expected<DbiStream &> PDBFile::getPDBDbiStream() {
Expected<TpiStream &> PDBFile::getPDBTpiStream() { Expected<TpiStream &> PDBFile::getPDBTpiStream() {
if (!Tpi) { if (!Tpi) {
auto TpiS = safelyCreateIndexedStream(ContainerLayout, *Buffer, StreamTPI); auto TpiS = safelyCreateIndexedStream(ContainerLayout, *Buffer, StreamTPI);
if (!TpiS) return TpiS.takeError(); if (!TpiS)
return TpiS.takeError();
auto TempTpi = llvm::make_unique<TpiStream>(*this, std::move(*TpiS)); auto TempTpi = llvm::make_unique<TpiStream>(*this, std::move(*TpiS));
if (auto EC = TempTpi->reload()) if (auto EC = TempTpi->reload())
return std::move(EC); return std::move(EC);
@ -277,7 +281,8 @@ Expected<TpiStream &> PDBFile::getPDBTpiStream() {
Expected<TpiStream &> PDBFile::getPDBIpiStream() { Expected<TpiStream &> PDBFile::getPDBIpiStream() {
if (!Ipi) { if (!Ipi) {
auto IpiS = safelyCreateIndexedStream(ContainerLayout, *Buffer, StreamIPI); auto IpiS = safelyCreateIndexedStream(ContainerLayout, *Buffer, StreamIPI);
if (!IpiS) return IpiS.takeError(); if (!IpiS)
return IpiS.takeError();
auto TempIpi = llvm::make_unique<TpiStream>(*this, std::move(*IpiS)); auto TempIpi = llvm::make_unique<TpiStream>(*this, std::move(*IpiS));
if (auto EC = TempIpi->reload()) if (auto EC = TempIpi->reload())
return std::move(EC); return std::move(EC);
@ -294,7 +299,8 @@ Expected<PublicsStream &> PDBFile::getPDBPublicsStream() {
auto PublicS = safelyCreateIndexedStream( auto PublicS = safelyCreateIndexedStream(
ContainerLayout, *Buffer, DbiS->getPublicSymbolStreamIndex()); ContainerLayout, *Buffer, DbiS->getPublicSymbolStreamIndex());
if (!PublicS) return PublicS.takeError(); if (!PublicS)
return PublicS.takeError();
auto TempPublics = auto TempPublics =
llvm::make_unique<PublicsStream>(*this, std::move(*PublicS)); llvm::make_unique<PublicsStream>(*this, std::move(*PublicS));
if (auto EC = TempPublics->reload()) if (auto EC = TempPublics->reload())
@ -313,7 +319,8 @@ Expected<SymbolStream &> PDBFile::getPDBSymbolStream() {
uint32_t SymbolStreamNum = DbiS->getSymRecordStreamIndex(); uint32_t SymbolStreamNum = DbiS->getSymRecordStreamIndex();
auto SymbolS = auto SymbolS =
safelyCreateIndexedStream(ContainerLayout, *Buffer, SymbolStreamNum); safelyCreateIndexedStream(ContainerLayout, *Buffer, SymbolStreamNum);
if (!SymbolS) return SymbolS.takeError(); if (!SymbolS)
return SymbolS.takeError();
auto TempSymbols = llvm::make_unique<SymbolStream>(std::move(*SymbolS)); auto TempSymbols = llvm::make_unique<SymbolStream>(std::move(*SymbolS));
if (auto EC = TempSymbols->reload()) if (auto EC = TempSymbols->reload())
@ -333,7 +340,8 @@ Expected<StringTable &> PDBFile::getStringTable() {
auto NS = auto NS =
safelyCreateIndexedStream(ContainerLayout, *Buffer, NameStreamIndex); safelyCreateIndexedStream(ContainerLayout, *Buffer, NameStreamIndex);
if (!NS) return NS.takeError(); if (!NS)
return NS.takeError();
StreamReader Reader(**NS); StreamReader Reader(**NS);
auto N = llvm::make_unique<StringTable>(); auto N = llvm::make_unique<StringTable>();
@ -349,7 +357,8 @@ bool PDBFile::hasPDBDbiStream() const { return StreamDBI < getNumStreams(); }
bool PDBFile::hasPDBGlobalsStream() { bool PDBFile::hasPDBGlobalsStream() {
auto DbiS = getPDBDbiStream(); auto DbiS = getPDBDbiStream();
if (!DbiS) return false; if (!DbiS)
return false;
return DbiS->getGlobalSymbolStreamIndex() < getNumStreams(); return DbiS->getGlobalSymbolStreamIndex() < getNumStreams();
} }
@ -359,13 +368,15 @@ bool PDBFile::hasPDBIpiStream() const { return StreamIPI < getNumStreams(); }
bool PDBFile::hasPDBPublicsStream() { bool PDBFile::hasPDBPublicsStream() {
auto DbiS = getPDBDbiStream(); auto DbiS = getPDBDbiStream();
if (!DbiS) return false; if (!DbiS)
return false;
return DbiS->getPublicSymbolStreamIndex() < getNumStreams(); return DbiS->getPublicSymbolStreamIndex() < getNumStreams();
} }
bool PDBFile::hasPDBSymbolStream() { bool PDBFile::hasPDBSymbolStream() {
auto DbiS = getPDBDbiStream(); auto DbiS = getPDBDbiStream();
if (!DbiS) return false; if (!DbiS)
return false;
return DbiS->getSymRecordStreamIndex() < getNumStreams(); return DbiS->getSymRecordStreamIndex() < getNumStreams();
} }
@ -373,7 +384,8 @@ bool PDBFile::hasPDBTpiStream() const { return StreamTPI < getNumStreams(); }
bool PDBFile::hasStringTable() { bool PDBFile::hasStringTable() {
auto IS = getPDBInfoStream(); auto IS = getPDBInfoStream();
if (!IS) return false; if (!IS)
return false;
return IS->getNamedStreamIndex("/names") < getNumStreams(); return IS->getNamedStreamIndex("/names") < getNumStreams();
} }
@ -382,9 +394,10 @@ bool PDBFile::hasStringTable() {
/// If it does not, the return value will have an MSFError with /// If it does not, the return value will have an MSFError with
/// code msf_error_code::no_stream. Else, the return value will /// code msf_error_code::no_stream. Else, the return value will
/// contain the stream returned by createIndexedStream(). /// contain the stream returned by createIndexedStream().
Expected<std::unique_ptr<MappedBlockStream>> PDBFile::safelyCreateIndexedStream( Expected<std::unique_ptr<MappedBlockStream>>
const MSFLayout &Layout, const ReadableStream &MsfData, PDBFile::safelyCreateIndexedStream(const MSFLayout &Layout,
uint32_t StreamIndex) const { const ReadableStream &MsfData,
uint32_t StreamIndex) const {
if (StreamIndex >= getNumStreams()) if (StreamIndex >= getNumStreams())
return make_error<RawError>(raw_error_code::no_stream); return make_error<RawError>(raw_error_code::no_stream);
return MappedBlockStream::createIndexedStream(Layout, MsfData, StreamIndex); return MappedBlockStream::createIndexedStream(Layout, MsfData, StreamIndex);

View File

@ -7,7 +7,7 @@
// //
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
#include "llvm/DebugInfo/PDB/Raw/PDBFileBuilder.h" #include "llvm/DebugInfo/PDB/Native/PDBFileBuilder.h"
#include "llvm/ADT/BitVector.h" #include "llvm/ADT/BitVector.h"
@ -15,14 +15,14 @@
#include "llvm/DebugInfo/MSF/StreamInterface.h" #include "llvm/DebugInfo/MSF/StreamInterface.h"
#include "llvm/DebugInfo/MSF/StreamWriter.h" #include "llvm/DebugInfo/MSF/StreamWriter.h"
#include "llvm/DebugInfo/PDB/GenericError.h" #include "llvm/DebugInfo/PDB/GenericError.h"
#include "llvm/DebugInfo/PDB/Raw/DbiStream.h" #include "llvm/DebugInfo/PDB/Native/DbiStream.h"
#include "llvm/DebugInfo/PDB/Raw/DbiStreamBuilder.h" #include "llvm/DebugInfo/PDB/Native/DbiStreamBuilder.h"
#include "llvm/DebugInfo/PDB/Raw/InfoStream.h" #include "llvm/DebugInfo/PDB/Native/InfoStream.h"
#include "llvm/DebugInfo/PDB/Raw/InfoStreamBuilder.h" #include "llvm/DebugInfo/PDB/Native/InfoStreamBuilder.h"
#include "llvm/DebugInfo/PDB/Raw/RawError.h" #include "llvm/DebugInfo/PDB/Native/RawError.h"
#include "llvm/DebugInfo/PDB/Raw/StringTableBuilder.h" #include "llvm/DebugInfo/PDB/Native/StringTableBuilder.h"
#include "llvm/DebugInfo/PDB/Raw/TpiStream.h" #include "llvm/DebugInfo/PDB/Native/TpiStream.h"
#include "llvm/DebugInfo/PDB/Raw/TpiStreamBuilder.h" #include "llvm/DebugInfo/PDB/Native/TpiStreamBuilder.h"
using namespace llvm; using namespace llvm;
using namespace llvm::codeview; using namespace llvm::codeview;

View File

@ -22,15 +22,15 @@
// //
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
#include "llvm/DebugInfo/PDB/Native/PublicsStream.h"
#include "GSI.h" #include "GSI.h"
#include "llvm/ADT/iterator_range.h" #include "llvm/ADT/iterator_range.h"
#include "llvm/DebugInfo/CodeView/SymbolRecord.h" #include "llvm/DebugInfo/CodeView/SymbolRecord.h"
#include "llvm/DebugInfo/MSF/MappedBlockStream.h" #include "llvm/DebugInfo/MSF/MappedBlockStream.h"
#include "llvm/DebugInfo/MSF/StreamReader.h" #include "llvm/DebugInfo/MSF/StreamReader.h"
#include "llvm/DebugInfo/PDB/Raw/PDBFile.h" #include "llvm/DebugInfo/PDB/Native/PDBFile.h"
#include "llvm/DebugInfo/PDB/Raw/PublicsStream.h" #include "llvm/DebugInfo/PDB/Native/RawError.h"
#include "llvm/DebugInfo/PDB/Raw/RawError.h" #include "llvm/DebugInfo/PDB/Native/SymbolStream.h"
#include "llvm/DebugInfo/PDB/Raw/SymbolStream.h"
#include "llvm/Support/Endian.h" #include "llvm/Support/Endian.h"
#include "llvm/Support/Error.h" #include "llvm/Support/Error.h"
#include <algorithm> #include <algorithm>

View File

@ -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/ErrorHandling.h"
#include "llvm/Support/ManagedStatic.h" #include "llvm/Support/ManagedStatic.h"

View File

@ -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/ADT/ArrayRef.h"
#include "llvm/DebugInfo/MSF/StreamReader.h" #include "llvm/DebugInfo/MSF/StreamReader.h"
#include "llvm/DebugInfo/PDB/Raw/Hash.h" #include "llvm/DebugInfo/PDB/Native/Hash.h"
#include "llvm/DebugInfo/PDB/Raw/RawError.h" #include "llvm/DebugInfo/PDB/Native/RawError.h"
#include "llvm/DebugInfo/PDB/Raw/RawTypes.h" #include "llvm/DebugInfo/PDB/Native/RawTypes.h"
#include "llvm/Support/Endian.h" #include "llvm/Support/Endian.h"
using namespace llvm; using namespace llvm;

View File

@ -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/ADT/ArrayRef.h"
#include "llvm/DebugInfo/MSF/StreamWriter.h" #include "llvm/DebugInfo/MSF/StreamWriter.h"
#include "llvm/DebugInfo/PDB/Raw/Hash.h" #include "llvm/DebugInfo/PDB/Native/Hash.h"
#include "llvm/DebugInfo/PDB/Raw/RawTypes.h" #include "llvm/DebugInfo/PDB/Native/RawTypes.h"
#include "llvm/Support/Endian.h" #include "llvm/Support/Endian.h"
using namespace llvm; using namespace llvm;

View File

@ -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/CodeView.h"
#include "llvm/DebugInfo/CodeView/TypeRecord.h" #include "llvm/DebugInfo/CodeView/TypeRecord.h"
#include "llvm/DebugInfo/MSF/MappedBlockStream.h" #include "llvm/DebugInfo/MSF/MappedBlockStream.h"
#include "llvm/DebugInfo/MSF/StreamReader.h" #include "llvm/DebugInfo/MSF/StreamReader.h"
#include "llvm/DebugInfo/PDB/Raw/PDBFile.h" #include "llvm/DebugInfo/PDB/Native/PDBFile.h"
#include "llvm/DebugInfo/PDB/Raw/RawConstants.h" #include "llvm/DebugInfo/PDB/Native/RawConstants.h"
#include "llvm/DebugInfo/PDB/Raw/RawError.h" #include "llvm/DebugInfo/PDB/Native/RawError.h"
#include "llvm/Support/Endian.h" #include "llvm/Support/Endian.h"

View File

@ -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/Native/Hash.h"
#include "llvm/DebugInfo/PDB/Raw/RawError.h" #include "llvm/DebugInfo/PDB/Native/RawError.h"
using namespace llvm; using namespace llvm;
using namespace llvm::codeview; using namespace llvm::codeview;

View File

@ -7,6 +7,7 @@
// //
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
#include "llvm/DebugInfo/PDB/Native/TpiStream.h"
#include "llvm/ADT/iterator_range.h" #include "llvm/ADT/iterator_range.h"
#include "llvm/DebugInfo/CodeView/CVTypeVisitor.h" #include "llvm/DebugInfo/CodeView/CVTypeVisitor.h"
#include "llvm/DebugInfo/CodeView/TypeDeserializer.h" #include "llvm/DebugInfo/CodeView/TypeDeserializer.h"
@ -14,12 +15,11 @@
#include "llvm/DebugInfo/CodeView/TypeVisitorCallbackPipeline.h" #include "llvm/DebugInfo/CodeView/TypeVisitorCallbackPipeline.h"
#include "llvm/DebugInfo/MSF/MappedBlockStream.h" #include "llvm/DebugInfo/MSF/MappedBlockStream.h"
#include "llvm/DebugInfo/MSF/StreamReader.h" #include "llvm/DebugInfo/MSF/StreamReader.h"
#include "llvm/DebugInfo/PDB/Raw/PDBFile.h" #include "llvm/DebugInfo/PDB/Native/PDBFile.h"
#include "llvm/DebugInfo/PDB/Raw/RawConstants.h" #include "llvm/DebugInfo/PDB/Native/RawConstants.h"
#include "llvm/DebugInfo/PDB/Raw/RawError.h" #include "llvm/DebugInfo/PDB/Native/RawError.h"
#include "llvm/DebugInfo/PDB/Raw/RawTypes.h" #include "llvm/DebugInfo/PDB/Native/RawTypes.h"
#include "llvm/DebugInfo/PDB/Raw/TpiHashing.h" #include "llvm/DebugInfo/PDB/Native/TpiHashing.h"
#include "llvm/DebugInfo/PDB/Raw/TpiStream.h"
#include "llvm/Support/Endian.h" #include "llvm/Support/Endian.h"
#include "llvm/Support/Error.h" #include "llvm/Support/Error.h"
#include <algorithm> #include <algorithm>
@ -154,20 +154,17 @@ uint16_t TpiStream::getTypeHashStreamAuxIndex() const {
uint32_t TpiStream::NumHashBuckets() const { return Header->NumHashBuckets; } uint32_t TpiStream::NumHashBuckets() const { return Header->NumHashBuckets; }
uint32_t TpiStream::getHashKeySize() const { return Header->HashKeySize; } uint32_t TpiStream::getHashKeySize() const { return Header->HashKeySize; }
FixedStreamArray<support::ulittle32_t> FixedStreamArray<support::ulittle32_t> TpiStream::getHashValues() const {
TpiStream::getHashValues() const {
return HashValues; return HashValues;
} }
FixedStreamArray<TypeIndexOffset> FixedStreamArray<TypeIndexOffset> TpiStream::getTypeIndexOffsets() const {
TpiStream::getTypeIndexOffsets() const {
return TypeIndexOffsets; return TypeIndexOffsets;
} }
HashTable &TpiStream::getHashAdjusters() { return HashAdjusters; } HashTable &TpiStream::getHashAdjusters() { return HashAdjusters; }
iterator_range<CVTypeArray::Iterator> iterator_range<CVTypeArray::Iterator> TpiStream::types(bool *HadError) const {
TpiStream::types(bool *HadError) const {
return make_range(TypeRecords.begin(HadError), TypeRecords.end()); return make_range(TypeRecords.begin(HadError), TypeRecords.end());
} }

View File

@ -7,6 +7,7 @@
// //
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
#include "llvm/DebugInfo/PDB/Native/TpiStreamBuilder.h"
#include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/STLExtras.h" #include "llvm/ADT/STLExtras.h"
#include "llvm/DebugInfo/CodeView/TypeIndex.h" #include "llvm/DebugInfo/CodeView/TypeIndex.h"
@ -17,11 +18,10 @@
#include "llvm/DebugInfo/MSF/StreamArray.h" #include "llvm/DebugInfo/MSF/StreamArray.h"
#include "llvm/DebugInfo/MSF/StreamReader.h" #include "llvm/DebugInfo/MSF/StreamReader.h"
#include "llvm/DebugInfo/MSF/StreamWriter.h" #include "llvm/DebugInfo/MSF/StreamWriter.h"
#include "llvm/DebugInfo/PDB/Raw/PDBFile.h" #include "llvm/DebugInfo/PDB/Native/PDBFile.h"
#include "llvm/DebugInfo/PDB/Raw/RawError.h" #include "llvm/DebugInfo/PDB/Native/RawError.h"
#include "llvm/DebugInfo/PDB/Raw/RawTypes.h" #include "llvm/DebugInfo/PDB/Native/RawTypes.h"
#include "llvm/DebugInfo/PDB/Raw/TpiStream.h" #include "llvm/DebugInfo/PDB/Native/TpiStream.h"
#include "llvm/DebugInfo/PDB/Raw/TpiStreamBuilder.h"
#include "llvm/Support/Allocator.h" #include "llvm/Support/Allocator.h"
#include "llvm/Support/Endian.h" #include "llvm/Support/Endian.h"
#include "llvm/Support/Error.h" #include "llvm/Support/Error.h"

View File

@ -17,7 +17,7 @@
#if LLVM_ENABLE_DIA_SDK #if LLVM_ENABLE_DIA_SDK
#include "llvm/DebugInfo/PDB/DIA/DIASession.h" #include "llvm/DebugInfo/PDB/DIA/DIASession.h"
#endif #endif
#include "llvm/DebugInfo/PDB/Raw/RawSession.h" #include "llvm/DebugInfo/PDB/Native/NativeSession.h"
#include "llvm/Support/ErrorHandling.h" #include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/ManagedStatic.h" #include "llvm/Support/ManagedStatic.h"
@ -28,7 +28,7 @@ Error llvm::pdb::loadDataForPDB(PDB_ReaderType Type, StringRef Path,
std::unique_ptr<IPDBSession> &Session) { std::unique_ptr<IPDBSession> &Session) {
// Create the correct concrete instance type based on the value of Type. // Create the correct concrete instance type based on the value of Type.
if (Type == PDB_ReaderType::Raw) if (Type == PDB_ReaderType::Raw)
return RawSession::createFromPdb(Path, Session); return NativeSession::createFromPdb(Path, Session);
#if LLVM_ENABLE_DIA_SDK #if LLVM_ENABLE_DIA_SDK
return DIASession::createFromPdb(Path, Session); return DIASession::createFromPdb(Path, Session);
@ -41,7 +41,7 @@ Error llvm::pdb::loadDataForEXE(PDB_ReaderType Type, StringRef Path,
std::unique_ptr<IPDBSession> &Session) { std::unique_ptr<IPDBSession> &Session) {
// Create the correct concrete instance type based on the value of Type. // Create the correct concrete instance type based on the value of Type.
if (Type == PDB_ReaderType::Raw) if (Type == PDB_ReaderType::Raw)
return RawSession::createFromExe(Path, Session); return NativeSession::createFromExe(Path, Session);
#if LLVM_ENABLE_DIA_SDK #if LLVM_ENABLE_DIA_SDK
return DIASession::createFromExe(Path, Session); return DIASession::createFromExe(Path, Session);

View File

@ -23,18 +23,18 @@
#include "llvm/DebugInfo/CodeView/TypeVisitorCallbackPipeline.h" #include "llvm/DebugInfo/CodeView/TypeVisitorCallbackPipeline.h"
#include "llvm/DebugInfo/MSF/MappedBlockStream.h" #include "llvm/DebugInfo/MSF/MappedBlockStream.h"
#include "llvm/DebugInfo/MSF/StreamReader.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/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/Object/COFF.h"
#include "llvm/Support/FormatVariadic.h" #include "llvm/Support/FormatVariadic.h"

View File

@ -20,10 +20,10 @@
#include "llvm/DebugInfo/CodeView/TypeDeserializer.h" #include "llvm/DebugInfo/CodeView/TypeDeserializer.h"
#include "llvm/DebugInfo/CodeView/TypeSerializer.h" #include "llvm/DebugInfo/CodeView/TypeSerializer.h"
#include "llvm/DebugInfo/CodeView/TypeVisitorCallbackPipeline.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/PDBExtras.h"
#include "llvm/DebugInfo/PDB/PDBTypes.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;
using namespace llvm::pdb; using namespace llvm::pdb;

View File

@ -16,9 +16,9 @@
#include "llvm/DebugInfo/CodeView/SymbolRecord.h" #include "llvm/DebugInfo/CodeView/SymbolRecord.h"
#include "llvm/DebugInfo/CodeView/TypeRecord.h" #include "llvm/DebugInfo/CodeView/TypeRecord.h"
#include "llvm/DebugInfo/MSF/MSFCommon.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/PDBTypes.h"
#include "llvm/DebugInfo/PDB/Raw/PDBFile.h"
#include "llvm/DebugInfo/PDB/Raw/RawConstants.h"
#include "llvm/Support/Endian.h" #include "llvm/Support/Endian.h"
#include "llvm/Support/YAMLTraits.h" #include "llvm/Support/YAMLTraits.h"

View File

@ -13,12 +13,12 @@
#include "llvm-pdbdump.h" #include "llvm-pdbdump.h"
#include "llvm/DebugInfo/MSF/MappedBlockStream.h" #include "llvm/DebugInfo/MSF/MappedBlockStream.h"
#include "llvm/DebugInfo/PDB/Raw/DbiStream.h" #include "llvm/DebugInfo/PDB/Native/DbiStream.h"
#include "llvm/DebugInfo/PDB/Raw/InfoStream.h" #include "llvm/DebugInfo/PDB/Native/InfoStream.h"
#include "llvm/DebugInfo/PDB/Raw/ModStream.h" #include "llvm/DebugInfo/PDB/Native/ModStream.h"
#include "llvm/DebugInfo/PDB/Raw/PDBFile.h" #include "llvm/DebugInfo/PDB/Native/PDBFile.h"
#include "llvm/DebugInfo/PDB/Raw/RawConstants.h" #include "llvm/DebugInfo/PDB/Native/RawConstants.h"
#include "llvm/DebugInfo/PDB/Raw/TpiStream.h" #include "llvm/DebugInfo/PDB/Native/TpiStream.h"
using namespace llvm; using namespace llvm;
using namespace llvm::pdb; using namespace llvm::pdb;

View File

@ -17,7 +17,7 @@
#include "llvm/DebugInfo/CodeView/TypeRecord.h" #include "llvm/DebugInfo/CodeView/TypeRecord.h"
#include "llvm/DebugInfo/CodeView/TypeSerializer.h" #include "llvm/DebugInfo/CodeView/TypeSerializer.h"
#include "llvm/DebugInfo/CodeView/TypeVisitorCallbackPipeline.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;
using namespace llvm::codeview; using namespace llvm::codeview;

View File

@ -35,24 +35,24 @@
#include "llvm/DebugInfo/PDB/IPDBEnumChildren.h" #include "llvm/DebugInfo/PDB/IPDBEnumChildren.h"
#include "llvm/DebugInfo/PDB/IPDBRawSymbol.h" #include "llvm/DebugInfo/PDB/IPDBRawSymbol.h"
#include "llvm/DebugInfo/PDB/IPDBSession.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/PDB.h"
#include "llvm/DebugInfo/PDB/PDBSymbolCompiland.h" #include "llvm/DebugInfo/PDB/PDBSymbolCompiland.h"
#include "llvm/DebugInfo/PDB/PDBSymbolData.h" #include "llvm/DebugInfo/PDB/PDBSymbolData.h"
#include "llvm/DebugInfo/PDB/PDBSymbolExe.h" #include "llvm/DebugInfo/PDB/PDBSymbolExe.h"
#include "llvm/DebugInfo/PDB/PDBSymbolFunc.h" #include "llvm/DebugInfo/PDB/PDBSymbolFunc.h"
#include "llvm/DebugInfo/PDB/PDBSymbolThunk.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/COM.h"
#include "llvm/Support/CommandLine.h" #include "llvm/Support/CommandLine.h"
#include "llvm/Support/ConvertUTF.h" #include "llvm/Support/ConvertUTF.h"
@ -404,7 +404,7 @@ static void pdb2Yaml(StringRef Path) {
std::unique_ptr<IPDBSession> Session; std::unique_ptr<IPDBSession> Session;
ExitOnErr(loadDataForPDB(PDB_ReaderType::Raw, Path, Session)); ExitOnErr(loadDataForPDB(PDB_ReaderType::Raw, Path, Session));
RawSession *RS = static_cast<RawSession *>(Session.get()); NativeSession *RS = static_cast<NativeSession *>(Session.get());
PDBFile &File = RS->getPDBFile(); PDBFile &File = RS->getPDBFile();
auto O = llvm::make_unique<YAMLOutputStyle>(File); auto O = llvm::make_unique<YAMLOutputStyle>(File);
O = llvm::make_unique<YAMLOutputStyle>(File); O = llvm::make_unique<YAMLOutputStyle>(File);
@ -416,7 +416,7 @@ static void dumpRaw(StringRef Path) {
std::unique_ptr<IPDBSession> Session; std::unique_ptr<IPDBSession> Session;
ExitOnErr(loadDataForPDB(PDB_ReaderType::Raw, Path, Session)); ExitOnErr(loadDataForPDB(PDB_ReaderType::Raw, Path, Session));
RawSession *RS = static_cast<RawSession *>(Session.get()); NativeSession *RS = static_cast<NativeSession *>(Session.get());
PDBFile &File = RS->getPDBFile(); PDBFile &File = RS->getPDBFile();
auto O = llvm::make_unique<LLVMOutputStyle>(File); auto O = llvm::make_unique<LLVMOutputStyle>(File);