[CodeView] Isolate Debug Info Fragments into standalone classes.
authorZachary Turner <zturner@google.com>
Thu, 27 Apr 2017 16:12:16 +0000 (16:12 +0000)
committerZachary Turner <zturner@google.com>
Thu, 27 Apr 2017 16:12:16 +0000 (16:12 +0000)
commitc37cb0c6a5c266f102c130bfe1daaa25329cb997
tree48cd2b14c7b818b9b1a6eec14ae4518ee2dc195d
parente5094474187a9b748589aa709c3e1e172d42e87f
[CodeView] Isolate Debug Info Fragments into standalone classes.

Previously parsing of these were all grouped together into a
single master class that could parse any type of debug info
fragment.

With writing forthcoming, the complexity of each individual
fragment is enough to warrant them having their own classes so
that reading and writing of each fragment type can be grouped
together, but isolated from the code for reading and writing
other fragment types.

In doing so, I found a place where parsing code was duplicated
for the FileChecksums fragment, across llvm-readobj and the
CodeView library, and one of the implementations had a bug.
Now that the codepaths are merged, the bug is resolved.

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

llvm-svn: 301557
19 files changed:
llvm/include/llvm/DebugInfo/CodeView/Line.h
llvm/include/llvm/DebugInfo/CodeView/ModuleDebugFileChecksumFragment.h [new file with mode: 0644]
llvm/include/llvm/DebugInfo/CodeView/ModuleDebugFragment.h
llvm/include/llvm/DebugInfo/CodeView/ModuleDebugFragmentRecord.h [new file with mode: 0644]
llvm/include/llvm/DebugInfo/CodeView/ModuleDebugFragmentVisitor.h
llvm/include/llvm/DebugInfo/CodeView/ModuleDebugLineFragment.h [new file with mode: 0644]
llvm/include/llvm/DebugInfo/CodeView/ModuleDebugUnknownFragment.h [new file with mode: 0644]
llvm/include/llvm/DebugInfo/PDB/Native/ModuleDebugStream.h
llvm/lib/DebugInfo/CodeView/CMakeLists.txt
llvm/lib/DebugInfo/CodeView/ModuleDebugFileChecksumFragment.cpp [new file with mode: 0644]
llvm/lib/DebugInfo/CodeView/ModuleDebugFragment.cpp
llvm/lib/DebugInfo/CodeView/ModuleDebugFragmentRecord.cpp [new file with mode: 0644]
llvm/lib/DebugInfo/CodeView/ModuleDebugFragmentVisitor.cpp
llvm/lib/DebugInfo/CodeView/ModuleDebugLineFragment.cpp [new file with mode: 0644]
llvm/lib/DebugInfo/CodeView/ModuleDebugUnknownFragment.cpp [new file with mode: 0644]
llvm/lib/DebugInfo/PDB/Native/ModuleDebugStream.cpp
llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp
llvm/tools/llvm-pdbdump/YAMLOutputStyle.cpp
llvm/tools/llvm-readobj/COFFDumper.cpp