Added support for CodeView Types.
Now type indices are auto generated.
The idea is:
- to lower types from LLVM DIType to CodeViewType during assembly processing (codeview symbol processing).
- assigned indices to all codeview types according to order they are going to be emitted in.
- emit the codeview types into .Debug$T section.
Note: This patch only adds support for Basic types and function type (and id).
Once this patch is committed, it will be relatively easy to support all other kind of types.
Few LIT tests were modified to be aligned with the changes and two LIT tests that covers basic types and function type were added.
This looks wrong to me. It does not include the length of the name. Also, I would prefer if the 2 + were raised somehow, because it is common to every single type of CodeView record, and this logic of knowing that a type record has 2 header bytes should be common somewhere.
Also, each type record knows how to deserialize itself (see the deserialize method above), should we centralize the serialization logic here as well using a similar pattern?