This is an archive of the discontinued LLVM Phabricator instance.

Update llvm-readobj to re-use parsing code
ClosedPublic

Authored by zturner on May 2 2017, 4:32 PM.

Details

Summary

llvm-readobj has a lot of hand rolled CodeView parsing code. Recently I introduced codeview::StringTableRef and codeview::StringTable which can read and write codeview stringtables from and to its serialized format. This patch updates llvm-readobj to use StringTableRef for parsing the string table, and since I'm in the code anyway, updates the file checksum parsing code to use VarStreamArray<FileChecksumEntry> which simplifies some error handling and parsing code.

Diff Detail

Repository
rL LLVM

Event Timeline

zturner created this revision.May 2 2017, 4:32 PM
rnk accepted this revision.May 2 2017, 5:40 PM
rnk added inline comments.
llvm/include/llvm/DebugInfo/CodeView/StringTable.h
39 ↗(On Diff #97522)

I went back and forth on this change, but I think it's a good idea. It's consistent with the way we did consumeObject etc.

This revision is now accepted and ready to land.May 2 2017, 5:40 PM
This revision was automatically updated to reflect the committed changes.