[PATCH] D21149: [CodeView] Add support for emitting S_UDT for typedefs

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 8 18:04:02 PDT 2016


rnk added a comment.

We spent some time talking about this today, and I think there's two ways to do this:

1. The hard way: compute type indices for all types used in the function's symbol substream before endFunction. Assert if someone calls getTypeIndex during .debug$S emission.
2. The easy way: Don't handle the corner cases where people reference function-internal typedefs from outside that function, and just handle typedefs at file/namespace scope and function scope. This is David's current approach.

I think we should go with approach 2, but we should also remember file/namespace scope typedefs before committing this. I think it just requires an 'else if' in the existing code and a vector on CodeViewDebug. Together that will handle 99% of all typedef usage.


http://reviews.llvm.org/D21149





More information about the llvm-commits mailing list