[CodeView] Use actual strings for dealing with checksums and lines.
authorZachary Turner <zturner@google.com>
Wed, 3 May 2017 17:11:40 +0000 (17:11 +0000)
committerZachary Turner <zturner@google.com>
Wed, 3 May 2017 17:11:40 +0000 (17:11 +0000)
commitcf468d86f33003e7591848a2d8f404f402b52005
tree66903bc00daae69ddb7d5d1cabbc3929e2b6f6bf
parent2d5c2cd3ce208ebfac2bceb4c73157bef4e00fdc
[CodeView] Use actual strings for dealing with checksums and lines.

The raw CodeView format references strings by "offsets", but it's
confusing what table the offset refers to.  In the case of line
number information, it's an offset into a buffer of records,
and an indirection is required to get another offset into a
different table to find the final string.  And in the case of
checksum information, there is no indirection, and the offset
refers directly to the location of the string in another buffer.

This would be less confusing if we always just referred to the
strings by their value, and have the library be smart enough
to correctly resolve the offsets on its own from the right
location.

This patch makes that possible.  When either reading or writing,
all the user deals with are strings, and the library does the
appropriate translations behind the scenes.

llvm-svn: 302053
llvm/include/llvm/DebugInfo/CodeView/ModuleDebugFileChecksumFragment.h
llvm/include/llvm/DebugInfo/CodeView/ModuleDebugInlineeLinesFragment.h
llvm/include/llvm/DebugInfo/CodeView/ModuleDebugLineFragment.h
llvm/include/llvm/DebugInfo/CodeView/StringTable.h
llvm/include/llvm/DebugInfo/PDB/Native/PDBStringTableBuilder.h
llvm/include/llvm/Support/BinaryStreamArray.h
llvm/lib/DebugInfo/CodeView/ModuleDebugFileChecksumFragment.cpp
llvm/lib/DebugInfo/CodeView/ModuleDebugInlineeLinesFragment.cpp
llvm/lib/DebugInfo/CodeView/ModuleDebugLineFragment.cpp
llvm/lib/DebugInfo/CodeView/StringTable.cpp
llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp