[PATCH] D26040: [CodeView] Add CodeViewRecordIO for reading and writing, and use it for reading type records.
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 28 15:00:12 PDT 2016
zturner updated this revision to Diff 76254.
zturner added a comment.
Fixed suggestions from ruiu.
I looked into using virtual function indirection as a means of hiding the branches, and it's not entirely straightforward since there's some template functions to handle many types at once. I could make it work, but I'm not sure it's a win.
Another idea is to raise this whole thing up into `CodeView/MSF` and make it more generic by using traits classes instead of Mapping functors. That would allow a single `Map` method that uses template specializations to find mapping classes, and allow the mapping classes to provide `read()` and `write()` methods that separate the logic. I gave it a try but it was a little hairy and gets into some design issues, but it seems like a reasonable avenue for improvement in a followup patch.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 134131 bytes
Desc: not available
More information about the llvm-commits