[PATCH] D19887: Move CodeViewTypeStream and iterators to DebugInfo/CodeView

Adrian McCarthy via llvm-commits llvm-commits at lists.llvm.org
Tue May 3 14:54:06 PDT 2016


amccarth added a comment.

I'm not thrilled with the backsliding with respect to the parsing of the magic number.  The magic number is part of the format of the type stream, and the original intent was to abstract the parsing of the typestream so that multiple users didn't have to know about the details.  Now we're exposing this detail again and making the callers know that they have to pass a subset of the typestream to construct the iterators.

Consider what happens in the future if there's a newer typestream format, and the indicator is in the magic number field.  This would completely break the abstraction.  The createCodeViewTypeStream function (which you removed) would probably have been a better place to handle the magic number).

That said, I won't object because I know this is still a work in progress, so I'm confident we'll find the right level of abstraction eventually.


http://reviews.llvm.org/D19887





More information about the llvm-commits mailing list