Skip to content

Commit

Permalink
NFC: Rename (PDB) RawSession to NativeSession
Browse files Browse the repository at this point in the history
This eliminates one overload on the term Raw.

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

llvm-svn: 293104
  • Loading branch information
amccarth-google committed Jan 25, 2017
1 parent 896b451 commit 6b6b8c4
Show file tree
Hide file tree
Showing 59 changed files with 271 additions and 259 deletions.
18 changes: 9 additions & 9 deletions lld/COFF/PDB.cpp
Expand Up @@ -23,15 +23,15 @@
#include "llvm/DebugInfo/MSF/ByteStream.h"
#include "llvm/DebugInfo/MSF/MSFBuilder.h"
#include "llvm/DebugInfo/MSF/MSFCommon.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/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/PDBFile.h"
#include "llvm/DebugInfo/PDB/Native/PDBFileBuilder.h"
#include "llvm/DebugInfo/PDB/Native/StringTableBuilder.h"
#include "llvm/DebugInfo/PDB/Native/TpiStream.h"
#include "llvm/DebugInfo/PDB/Native/TpiStreamBuilder.h"
#include "llvm/Object/COFF.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/FileOutputBuffer.h"
Expand Down
Expand Up @@ -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"

Expand Down
Expand Up @@ -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 {
Expand Down Expand Up @@ -60,8 +60,7 @@ class DbiStreamBuilder {

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.
Expand Down
Expand Up @@ -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 {
Expand Down
File renamed without changes.
Expand Up @@ -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"
Expand Down
Expand Up @@ -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 {
Expand Down
Expand Up @@ -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 <cstdint>
#include <vector>
Expand Down
Expand Up @@ -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 <cstdint>

Expand Down
@@ -1,4 +1,4 @@
//===- RawSession.h - Native implementation of IPDBSession ------*- C++ -*-===//
//===- NativeSession.h - Native implementation of IPDBSession ---*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
Expand All @@ -19,11 +19,11 @@ namespace llvm {
namespace pdb {
class PDBFile;

class RawSession : public IPDBSession {
class NativeSession : public IPDBSession {
public:
RawSession(std::unique_ptr<PDBFile> PdbFile,
std::unique_ptr<BumpPtrAllocator> Allocator);
~RawSession() override;
NativeSession(std::unique_ptr<PDBFile> PdbFile,
std::unique_ptr<BumpPtrAllocator> Allocator);
~NativeSession() override;

static Error createFromPdb(StringRef Path,
std::unique_ptr<IPDBSession> &Session);
Expand Down
Expand Up @@ -104,10 +104,11 @@ class PDBFile : public msf::IMSFFile {
bool hasPDBTpiStream() const;
bool hasStringTable();

private:
Expected<std::unique_ptr<msf::MappedBlockStream>> safelyCreateIndexedStream(
const msf::MSFLayout &Layout, const msf::ReadableStream &MsfData,
uint32_t StreamIndex) const;
private:
Expected<std::unique_ptr<msf::MappedBlockStream>>
safelyCreateIndexedStream(const msf::MSFLayout &Layout,
const msf::ReadableStream &MsfData,
uint32_t StreamIndex) const;

BumpPtrAllocator &Allocator;

Expand Down
Expand Up @@ -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"
Expand Down
Expand Up @@ -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"

Expand Down
Expand Up @@ -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 <cstdint>
Expand Down
Expand Up @@ -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"
Expand Down
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/DebugInfo/PDB/PDBTypes.h
Expand Up @@ -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 <cstdint>
#include <cstring>
#include <functional>
Expand Down
50 changes: 25 additions & 25 deletions llvm/lib/DebugInfo/PDB/CMakeLists.txt
Expand Up @@ -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
Expand Down
Expand Up @@ -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 <algorithm>
Expand Down Expand Up @@ -47,8 +47,7 @@ static Error loadSectionContribs(FixedStreamArray<ContribType> &Output,
}

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;

Expand Down Expand Up @@ -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())
Expand Down
Expand Up @@ -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"

Expand Down
Expand Up @@ -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;
Expand Down
Expand Up @@ -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"

Expand Down
Expand Up @@ -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"
Expand Down
Expand Up @@ -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 <algorithm>

Expand Down

0 comments on commit 6b6b8c4

Please sign in to comment.