]> granicus.if.org Git - llvm/commit
Make codeview::StringTable.
authorZachary Turner <zturner@google.com>
Tue, 2 May 2017 23:36:17 +0000 (23:36 +0000)
committerZachary Turner <zturner@google.com>
Tue, 2 May 2017 23:36:17 +0000 (23:36 +0000)
commit288180ac40ab050711298f42340233bd47916634
tree9c7749bace4800a2c8797f152117d60d290b27e7
parent66ac3d52f55538696a7c9cd9b6990354d9e00558
Make codeview::StringTable.

Previously we had knowledge of how to serialize and deserialize
a string table inside of DebugInfo/PDB, but the string table
that it serializes contains a piece that is actually considered
CodeView and can appear outside of a PDB.  We already have logic
in llvm-readobj and MCCodeView to read and write this format,
so it doesn't make sense to duplicate the logic in DebugInfoPDB
as well.

This patch makes codeview::StringTable (for writing) and
codeview::StringTableRef (for reading), updates DebugInfoPDB
to use these classes for its own writing, and updates llvm-readobj
to additionally use StringTableRef for reading.

It's a bit more difficult to get MCCodeView to use this for
writing, but it's a logical next step.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301986 91177308-0d34-0410-b5e6-96231b3b80d8
19 files changed:
include/llvm/DebugInfo/CodeView/StringTable.h [new file with mode: 0644]
include/llvm/DebugInfo/PDB/Native/PDBFile.h
include/llvm/DebugInfo/PDB/Native/PDBFileBuilder.h
include/llvm/DebugInfo/PDB/Native/PDBStringTable.h
include/llvm/DebugInfo/PDB/Native/PDBStringTableBuilder.h
include/llvm/DebugInfo/PDB/Native/RawTypes.h
include/llvm/Support/BinaryStreamReader.h
include/llvm/Support/BinaryStreamWriter.h
lib/DebugInfo/CodeView/CMakeLists.txt
lib/DebugInfo/CodeView/StringTable.cpp [new file with mode: 0644]
lib/DebugInfo/PDB/Native/DbiStream.cpp
lib/DebugInfo/PDB/Native/PDBFile.cpp
lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp
lib/DebugInfo/PDB/Native/PDBStringTable.cpp
lib/DebugInfo/PDB/Native/PDBStringTableBuilder.cpp
lib/DebugInfo/PDB/Native/StringTableStreamBuilder.cpp [new file with mode: 0644]
lib/Support/BinaryStreamReader.cpp
lib/Support/BinaryStreamWriter.cpp
unittests/DebugInfo/PDB/StringTableBuilderTest.cpp