From e204a6c9a3d290907e90742a53c10a2f12779945 Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Tue, 2 May 2017 18:00:13 +0000 Subject: [PATCH] Rename pdb::StringTable -> pdb::PDBStringTable. With the forthcoming codeview::StringTable which a pdb::StringTable would hold an instance of as one member, this ambiguity becomes confusing. Rename to PDBStringTable to avoid this. llvm-svn: 301948 --- lld/COFF/PDB.cpp | 2 +- llvm/include/llvm/DebugInfo/PDB/Native/DbiStream.h | 4 ++-- llvm/include/llvm/DebugInfo/PDB/Native/PDBFile.h | 10 ++++----- .../llvm/DebugInfo/PDB/Native/PDBFileBuilder.h | 6 +++--- .../PDB/Native/{StringTable.h => PDBStringTable.h} | 11 +++++----- ...tringTableBuilder.h => PDBStringTableBuilder.h} | 10 ++++----- llvm/include/llvm/DebugInfo/PDB/Native/RawTypes.h | 4 ++-- llvm/lib/DebugInfo/PDB/CMakeLists.txt | 4 ++-- llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp | 12 +++++------ llvm/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp | 18 +++++++++------- .../Native/{StringTable.cpp => PDBStringTable.cpp} | 25 +++++++++++----------- ...gTableBuilder.cpp => PDBStringTableBuilder.cpp} | 18 ++++++++-------- .../tools/llvm-pdbdump/C13DebugFragmentVisitor.cpp | 2 +- llvm/tools/llvm-pdbdump/Diff.cpp | 2 +- llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp | 4 ++-- .../DebugInfo/PDB/StringTableBuilderTest.cpp | 8 +++---- 16 files changed, 71 insertions(+), 69 deletions(-) rename llvm/include/llvm/DebugInfo/PDB/Native/{StringTable.h => PDBStringTable.h} (84%) rename llvm/include/llvm/DebugInfo/PDB/Native/{StringTableBuilder.h => PDBStringTableBuilder.h} (78%) rename llvm/lib/DebugInfo/PDB/Native/{StringTable.cpp => PDBStringTable.cpp} (82%) rename llvm/lib/DebugInfo/PDB/Native/{StringTableBuilder.cpp => PDBStringTableBuilder.cpp} (86%) diff --git a/lld/COFF/PDB.cpp b/lld/COFF/PDB.cpp index e32bcd2..20411a7 100644 --- a/lld/COFF/PDB.cpp +++ b/lld/COFF/PDB.cpp @@ -28,8 +28,8 @@ #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/PDBStringTableBuilder.h" #include "llvm/DebugInfo/PDB/Native/PDBTypeServerHandler.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" diff --git a/llvm/include/llvm/DebugInfo/PDB/Native/DbiStream.h b/llvm/include/llvm/DebugInfo/PDB/Native/DbiStream.h index 84ae57f..08262e4 100644 --- a/llvm/include/llvm/DebugInfo/PDB/Native/DbiStream.h +++ b/llvm/include/llvm/DebugInfo/PDB/Native/DbiStream.h @@ -13,9 +13,9 @@ #include "llvm/DebugInfo/CodeView/ModuleDebugFragment.h" #include "llvm/DebugInfo/MSF/MappedBlockStream.h" #include "llvm/DebugInfo/PDB/Native/DbiModuleDescriptor.h" +#include "llvm/DebugInfo/PDB/Native/PDBStringTable.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/Support/BinaryStreamArray.h" #include "llvm/Support/BinaryStreamArray.h" @@ -91,7 +91,7 @@ private: std::unique_ptr Stream; std::vector ModuleInfos; - StringTable ECNames; + PDBStringTable ECNames; BinaryStreamRef ModInfoSubstream; BinaryStreamRef SecContrSubstream; diff --git a/llvm/include/llvm/DebugInfo/PDB/Native/PDBFile.h b/llvm/include/llvm/DebugInfo/PDB/Native/PDBFile.h index fbca62d..5510360 100644 --- a/llvm/include/llvm/DebugInfo/PDB/Native/PDBFile.h +++ b/llvm/include/llvm/DebugInfo/PDB/Native/PDBFile.h @@ -33,7 +33,7 @@ namespace pdb { class DbiStream; class GlobalsStream; class InfoStream; -class StringTable; +class PDBStringTable; class PDBFileBuilder; class PublicsStream; class SymbolStream; @@ -95,7 +95,7 @@ public: Expected getPDBIpiStream(); Expected getPDBPublicsStream(); Expected getPDBSymbolStream(); - Expected getStringTable(); + Expected getStringTable(); BumpPtrAllocator &getAllocator() { return Allocator; } @@ -106,7 +106,7 @@ public: bool hasPDBPublicsStream(); bool hasPDBSymbolStream(); bool hasPDBTpiStream() const; - bool hasStringTable(); + bool hasPDBStringTable(); private: Expected> @@ -130,8 +130,8 @@ private: std::unique_ptr Publics; std::unique_ptr Symbols; std::unique_ptr DirectoryStream; - std::unique_ptr StringTableStream; - std::unique_ptr Strings; + std::unique_ptr PDBStringTableStream; + std::unique_ptr Strings; }; } } diff --git a/llvm/include/llvm/DebugInfo/PDB/Native/PDBFileBuilder.h b/llvm/include/llvm/DebugInfo/PDB/Native/PDBFileBuilder.h index 3898af5..941d311 100644 --- a/llvm/include/llvm/DebugInfo/PDB/Native/PDBFileBuilder.h +++ b/llvm/include/llvm/DebugInfo/PDB/Native/PDBFileBuilder.h @@ -15,8 +15,8 @@ #include "llvm/ADT/Optional.h" #include "llvm/DebugInfo/PDB/Native/NamedStreamMap.h" #include "llvm/DebugInfo/PDB/Native/PDBFile.h" +#include "llvm/DebugInfo/PDB/Native/PDBStringTableBuilder.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" @@ -46,7 +46,7 @@ public: DbiStreamBuilder &getDbiBuilder(); TpiStreamBuilder &getTpiBuilder(); TpiStreamBuilder &getIpiBuilder(); - StringTableBuilder &getStringTableBuilder(); + PDBStringTableBuilder &getStringTableBuilder(); Error commit(StringRef Filename); @@ -62,7 +62,7 @@ private: std::unique_ptr Tpi; std::unique_ptr Ipi; - StringTableBuilder Strings; + PDBStringTableBuilder Strings; NamedStreamMap NamedStreams; }; } diff --git a/llvm/include/llvm/DebugInfo/PDB/Native/StringTable.h b/llvm/include/llvm/DebugInfo/PDB/Native/PDBStringTable.h similarity index 84% rename from llvm/include/llvm/DebugInfo/PDB/Native/StringTable.h rename to llvm/include/llvm/DebugInfo/PDB/Native/PDBStringTable.h index dd5e30e..a0c9bf6 100644 --- a/llvm/include/llvm/DebugInfo/PDB/Native/StringTable.h +++ b/llvm/include/llvm/DebugInfo/PDB/Native/PDBStringTable.h @@ -1,4 +1,5 @@ -//===- StringTable.h - PDB String Table -------------------------*- C++ -*-===// +//===- PDBStringTable.h - PDB String Table -------------------------*- C++ +//-*-===// // // The LLVM Compiler Infrastructure // @@ -7,8 +8,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_DEBUGINFO_PDB_RAW_STRINGTABLE_H -#define LLVM_DEBUGINFO_PDB_RAW_STRINGTABLE_H +#ifndef LLVM_DEBUGINFO_PDB_RAW_PDBSTRINGTABLE_H +#define LLVM_DEBUGINFO_PDB_RAW_PDBSTRINGTABLE_H #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/StringRef.h" @@ -24,9 +25,9 @@ class BinaryStreamReader; namespace pdb { -class StringTable { +class PDBStringTable { public: - StringTable(); + PDBStringTable(); Error load(BinaryStreamReader &Stream); diff --git a/llvm/include/llvm/DebugInfo/PDB/Native/StringTableBuilder.h b/llvm/include/llvm/DebugInfo/PDB/Native/PDBStringTableBuilder.h similarity index 78% rename from llvm/include/llvm/DebugInfo/PDB/Native/StringTableBuilder.h rename to llvm/include/llvm/DebugInfo/PDB/Native/PDBStringTableBuilder.h index 9c4b12e..71ed5b4 100644 --- a/llvm/include/llvm/DebugInfo/PDB/Native/StringTableBuilder.h +++ b/llvm/include/llvm/DebugInfo/PDB/Native/PDBStringTableBuilder.h @@ -1,4 +1,4 @@ -//===- StringTableBuilder.h - PDB String Table Builder ----------*- C++ -*-===// +//===- PDBStringTableBuilder.h - PDB String Table Builder -------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -11,8 +11,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_DEBUGINFO_PDB_RAW_STRINGTABLEBUILDER_H -#define LLVM_DEBUGINFO_PDB_RAW_STRINGTABLEBUILDER_H +#ifndef LLVM_DEBUGINFO_PDB_RAW_PDBSTRINGTABLEBUILDER_H +#define LLVM_DEBUGINFO_PDB_RAW_PDBSTRINGTABLEBUILDER_H #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/StringRef.h" @@ -24,7 +24,7 @@ class BinaryStreamWriter; namespace pdb { -class StringTableBuilder { +class PDBStringTableBuilder { public: // If string S does not exist in the string table, insert it. // Returns the ID for S. @@ -42,4 +42,4 @@ private: } // end namespace pdb } // end namespace llvm -#endif // LLVM_DEBUGINFO_PDB_RAW_STRINGTABLEBUILDER_H +#endif // LLVM_DEBUGINFO_PDB_RAW_PDBSTRINGTABLEBUILDER_H diff --git a/llvm/include/llvm/DebugInfo/PDB/Native/RawTypes.h b/llvm/include/llvm/DebugInfo/PDB/Native/RawTypes.h index e1c6cf0..ba0c75b 100644 --- a/llvm/include/llvm/DebugInfo/PDB/Native/RawTypes.h +++ b/llvm/include/llvm/DebugInfo/PDB/Native/RawTypes.h @@ -307,13 +307,13 @@ struct InfoStreamHeader { }; /// The header preceeding the /names stream. -struct StringTableHeader { +struct PDBStringTableHeader { support::ulittle32_t Signature; support::ulittle32_t HashVersion; support::ulittle32_t ByteSize; }; -const uint32_t StringTableSignature = 0xEFFEEFFE; +const uint32_t PDBStringTableSignature = 0xEFFEEFFE; } // namespace pdb } // namespace llvm diff --git a/llvm/lib/DebugInfo/PDB/CMakeLists.txt b/llvm/lib/DebugInfo/PDB/CMakeLists.txt index bd35efb..e175301 100644 --- a/llvm/lib/DebugInfo/PDB/CMakeLists.txt +++ b/llvm/lib/DebugInfo/PDB/CMakeLists.txt @@ -48,11 +48,11 @@ add_pdb_impl_folder(Native Native/NativeSession.cpp Native/PDBFile.cpp Native/PDBFileBuilder.cpp + Native/PDBStringTable.cpp + Native/PDBStringTableBuilder.cpp Native/PDBTypeServerHandler.cpp Native/PublicsStream.cpp Native/RawError.cpp - Native/StringTable.cpp - Native/StringTableBuilder.cpp Native/SymbolStream.cpp Native/TpiHashing.cpp Native/TpiStream.cpp diff --git a/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp b/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp index 943e7fa..f158c5c 100644 --- a/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp @@ -15,9 +15,9 @@ #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/PDBStringTable.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/BinaryStream.h" @@ -337,8 +337,8 @@ Expected PDBFile::getPDBSymbolStream() { return *Symbols; } -Expected PDBFile::getStringTable() { - if (!Strings || !StringTableStream) { +Expected PDBFile::getStringTable() { + if (!Strings || !PDBStringTableStream) { auto IS = getPDBInfoStream(); if (!IS) return IS.takeError(); @@ -351,11 +351,11 @@ Expected PDBFile::getStringTable() { return NS.takeError(); BinaryStreamReader Reader(**NS); - auto N = llvm::make_unique(); + auto N = llvm::make_unique(); if (auto EC = N->load(Reader)) return std::move(EC); Strings = std::move(N); - StringTableStream = std::move(*NS); + PDBStringTableStream = std::move(*NS); } return *Strings; } @@ -389,7 +389,7 @@ bool PDBFile::hasPDBSymbolStream() { bool PDBFile::hasPDBTpiStream() const { return StreamTPI < getNumStreams(); } -bool PDBFile::hasStringTable() { +bool PDBFile::hasPDBStringTable() { auto IS = getPDBInfoStream(); if (!IS) return false; diff --git a/llvm/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp b/llvm/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp index b3c8490..972c995 100644 --- a/llvm/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp @@ -17,8 +17,8 @@ #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/PDBStringTableBuilder.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/Support/BinaryStream.h" @@ -67,7 +67,9 @@ TpiStreamBuilder &PDBFileBuilder::getIpiBuilder() { return *Ipi; } -StringTableBuilder &PDBFileBuilder::getStringTableBuilder() { return Strings; } +PDBStringTableBuilder &PDBFileBuilder::getStringTableBuilder() { + return Strings; +} Error PDBFileBuilder::addNamedStream(StringRef Name, uint32_t Size) { auto ExpectedStream = Msf->addStream(Size); @@ -78,9 +80,9 @@ Error PDBFileBuilder::addNamedStream(StringRef Name, uint32_t Size) { } Expected PDBFileBuilder::finalizeMsfLayout() { - uint32_t StringTableSize = Strings.finalize(); + uint32_t PDBStringTableSize = Strings.finalize(); - if (auto EC = addNamedStream("/names", StringTableSize)) + if (auto EC = addNamedStream("/names", PDBStringTableSize)) return std::move(EC); if (auto EC = addNamedStream("/LinkInfo", 0)) return std::move(EC); @@ -144,12 +146,12 @@ Error PDBFileBuilder::commit(StringRef Filename) { return EC; } - uint32_t StringTableStreamNo = 0; - if (!NamedStreams.get("/names", StringTableStreamNo)) + uint32_t PDBStringTableStreamNo = 0; + if (!NamedStreams.get("/names", PDBStringTableStreamNo)) return llvm::make_error(raw_error_code::no_stream); - auto NS = WritableMappedBlockStream::createIndexedStream(Layout, Buffer, - StringTableStreamNo); + auto NS = WritableMappedBlockStream::createIndexedStream( + Layout, Buffer, PDBStringTableStreamNo); BinaryStreamWriter NSWriter(*NS); if (auto EC = Strings.commit(NSWriter)) return EC; diff --git a/llvm/lib/DebugInfo/PDB/Native/StringTable.cpp b/llvm/lib/DebugInfo/PDB/Native/PDBStringTable.cpp similarity index 82% rename from llvm/lib/DebugInfo/PDB/Native/StringTable.cpp rename to llvm/lib/DebugInfo/PDB/Native/PDBStringTable.cpp index 7e28389..fd3e69d 100644 --- a/llvm/lib/DebugInfo/PDB/Native/StringTable.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/PDBStringTable.cpp @@ -1,4 +1,5 @@ -//===- StringTable.cpp - PDB String Table -----------------------*- C++ -*-===// +//===- PDBStringTable.cpp - PDB String Table -----------------------*- C++ +//-*-===// // // The LLVM Compiler Infrastructure // @@ -7,7 +8,7 @@ // //===----------------------------------------------------------------------===// -#include "llvm/DebugInfo/PDB/Native/StringTable.h" +#include "llvm/DebugInfo/PDB/Native/PDBStringTable.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/DebugInfo/PDB/Native/Hash.h" @@ -20,16 +21,16 @@ using namespace llvm; using namespace llvm::support; using namespace llvm::pdb; -StringTable::StringTable() {} +PDBStringTable::PDBStringTable() {} -Error StringTable::load(BinaryStreamReader &Stream) { +Error PDBStringTable::load(BinaryStreamReader &Stream) { ByteSize = Stream.getLength(); - const StringTableHeader *H; + const PDBStringTableHeader *H; if (auto EC = Stream.readObject(H)) return EC; - if (H->Signature != StringTableSignature) + if (H->Signature != PDBStringTableSignature) return make_error(raw_error_code::corrupt_file, "Invalid hash table signature"); if (H->HashVersion != 1 && H->HashVersion != 2) @@ -61,16 +62,14 @@ Error StringTable::load(BinaryStreamReader &Stream) { if (Stream.bytesRemaining() > 0) return make_error(raw_error_code::stream_too_long, - "Unexpected bytes found in string table"); + "Unexpected bytes found in string table"); return Error::success(); } -uint32_t StringTable::getByteSize() const { - return ByteSize; -} +uint32_t PDBStringTable::getByteSize() const { return ByteSize; } -StringRef StringTable::getStringForID(uint32_t ID) const { +StringRef PDBStringTable::getStringForID(uint32_t ID) const { if (ID == IDs[0]) return StringRef(); @@ -85,7 +84,7 @@ StringRef StringTable::getStringForID(uint32_t ID) const { return Result; } -uint32_t StringTable::getIDForString(StringRef Str) const { +uint32_t PDBStringTable::getIDForString(StringRef Str) const { uint32_t Hash = (HashVersion == 1) ? hashStringV1(Str) : hashStringV2(Str); size_t Count = IDs.size(); uint32_t Start = Hash % Count; @@ -104,6 +103,6 @@ uint32_t StringTable::getIDForString(StringRef Str) const { return IDs[0]; } -FixedStreamArray StringTable::name_ids() const { +FixedStreamArray PDBStringTable::name_ids() const { return IDs; } diff --git a/llvm/lib/DebugInfo/PDB/Native/StringTableBuilder.cpp b/llvm/lib/DebugInfo/PDB/Native/PDBStringTableBuilder.cpp similarity index 86% rename from llvm/lib/DebugInfo/PDB/Native/StringTableBuilder.cpp rename to llvm/lib/DebugInfo/PDB/Native/PDBStringTableBuilder.cpp index 40dc8e1..4add6ea 100644 --- a/llvm/lib/DebugInfo/PDB/Native/StringTableBuilder.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/PDBStringTableBuilder.cpp @@ -1,4 +1,4 @@ -//===- StringTableBuilder.cpp - PDB String Table ----------------*- C++ -*-===// +//===- PDBStringTableBuilder.cpp - PDB String Table -------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// -#include "llvm/DebugInfo/PDB/Native/StringTableBuilder.h" +#include "llvm/DebugInfo/PDB/Native/PDBStringTableBuilder.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/DebugInfo/PDB/Native/Hash.h" #include "llvm/DebugInfo/PDB/Native/RawTypes.h" @@ -19,7 +19,7 @@ using namespace llvm::support; using namespace llvm::support::endian; using namespace llvm::pdb; -uint32_t StringTableBuilder::insert(StringRef S) { +uint32_t PDBStringTableBuilder::insert(StringRef S) { auto P = Strings.insert({S, StringSize}); // If a given string didn't exist in the string table, we want to increment @@ -29,7 +29,7 @@ uint32_t StringTableBuilder::insert(StringRef S) { return P.first->second; } -uint32_t StringTableBuilder::getStringIndex(StringRef S) { +uint32_t PDBStringTableBuilder::getStringIndex(StringRef S) { auto Iter = Strings.find(S); assert(Iter != Strings.end()); return Iter->second; @@ -44,9 +44,9 @@ static uint32_t computeBucketCount(uint32_t NumStrings) { return (NumStrings + 1) * 1.25; } -uint32_t StringTableBuilder::finalize() { +uint32_t PDBStringTableBuilder::finalize() { uint32_t Size = 0; - Size += sizeof(StringTableHeader); + Size += sizeof(PDBStringTableHeader); Size += StringSize; Size += sizeof(uint32_t); // Hash table begins with 4-byte size field. @@ -58,10 +58,10 @@ uint32_t StringTableBuilder::finalize() { return Size; } -Error StringTableBuilder::commit(BinaryStreamWriter &Writer) const { +Error PDBStringTableBuilder::commit(BinaryStreamWriter &Writer) const { // Write a header - StringTableHeader H; - H.Signature = StringTableSignature; + PDBStringTableHeader H; + H.Signature = PDBStringTableSignature; H.HashVersion = 1; H.ByteSize = StringSize; if (auto EC = Writer.writeObject(H)) diff --git a/llvm/tools/llvm-pdbdump/C13DebugFragmentVisitor.cpp b/llvm/tools/llvm-pdbdump/C13DebugFragmentVisitor.cpp index 7c680eb..b38b365 100644 --- a/llvm/tools/llvm-pdbdump/C13DebugFragmentVisitor.cpp +++ b/llvm/tools/llvm-pdbdump/C13DebugFragmentVisitor.cpp @@ -13,8 +13,8 @@ #include "llvm/DebugInfo/CodeView/ModuleDebugInlineeLinesFragment.h" #include "llvm/DebugInfo/CodeView/ModuleDebugLineFragment.h" #include "llvm/DebugInfo/PDB/Native/PDBFile.h" +#include "llvm/DebugInfo/PDB/Native/PDBStringTable.h" #include "llvm/DebugInfo/PDB/Native/RawError.h" -#include "llvm/DebugInfo/PDB/Native/StringTable.h" using namespace llvm; using namespace llvm::codeview; diff --git a/llvm/tools/llvm-pdbdump/Diff.cpp b/llvm/tools/llvm-pdbdump/Diff.cpp index 8c02d36..ddae9b7 100644 --- a/llvm/tools/llvm-pdbdump/Diff.cpp +++ b/llvm/tools/llvm-pdbdump/Diff.cpp @@ -15,8 +15,8 @@ #include "llvm/DebugInfo/PDB/Native/Formatters.h" #include "llvm/DebugInfo/PDB/Native/InfoStream.h" #include "llvm/DebugInfo/PDB/Native/PDBFile.h" +#include "llvm/DebugInfo/PDB/Native/PDBStringTable.h" #include "llvm/DebugInfo/PDB/Native/RawConstants.h" -#include "llvm/DebugInfo/PDB/Native/StringTable.h" #include "llvm/Support/FormatAdapters.h" #include "llvm/Support/FormatProviders.h" diff --git a/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp b/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp index 642e169..adc739b 100644 --- a/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp +++ b/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp @@ -47,9 +47,9 @@ #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/PDBStringTableBuilder.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" @@ -427,7 +427,7 @@ static ExitOnError ExitOnErr; static uint32_t getFileChecksumOffset(StringRef FileName, ModuleDebugFileChecksumFragment &Checksums, - StringTableBuilder &Strings) { + PDBStringTableBuilder &Strings) { // The offset in the line info record is the offset of the checksum // entry for the corresponding file. That entry then contains an // offset into the global string table of the file name. So to diff --git a/llvm/unittests/DebugInfo/PDB/StringTableBuilderTest.cpp b/llvm/unittests/DebugInfo/PDB/StringTableBuilderTest.cpp index 7c48387..514cdc8 100644 --- a/llvm/unittests/DebugInfo/PDB/StringTableBuilderTest.cpp +++ b/llvm/unittests/DebugInfo/PDB/StringTableBuilderTest.cpp @@ -9,8 +9,8 @@ #include "ErrorChecking.h" -#include "llvm/DebugInfo/PDB/Native/StringTable.h" -#include "llvm/DebugInfo/PDB/Native/StringTableBuilder.h" +#include "llvm/DebugInfo/PDB/Native/PDBStringTable.h" +#include "llvm/DebugInfo/PDB/Native/PDBStringTableBuilder.h" #include "llvm/Support/BinaryByteStream.h" #include "llvm/Support/BinaryStreamReader.h" #include "llvm/Support/BinaryStreamWriter.h" @@ -27,7 +27,7 @@ class StringTableBuilderTest : public ::testing::Test {}; TEST_F(StringTableBuilderTest, Simple) { // Create /names table contents. - StringTableBuilder Builder; + PDBStringTableBuilder Builder; EXPECT_EQ(1U, Builder.insert("foo")); EXPECT_EQ(5U, Builder.insert("bar")); EXPECT_EQ(1U, Builder.insert("foo")); @@ -41,7 +41,7 @@ TEST_F(StringTableBuilderTest, Simple) { // Reads the contents back. BinaryByteStream InStream(Buffer, little); BinaryStreamReader Reader(InStream); - StringTable Table; + PDBStringTable Table; EXPECT_NO_ERROR(Table.load(Reader)); EXPECT_EQ(3U, Table.getNameCount()); -- 2.7.4