- Emit UdtSourceLine information for enums to match MSVC
- Add a method to add UDTSrcLine and call it for all Class/Struct/Union/Enum
- Update test cases to verify the changes
Differential D44116
[CodeView] Emit UdtSourceLine information for enums asmith on Mar 5 2018, 1:15 PM. Authored by
Details
Diff Detail Event TimelineComment Actions We also probably need to emit S_UDT symbol records in the right place. Can you factor out a method with this code from lowerCompleteTypeClass and make Class, Enum, and Union code call it? This is the duplicated code that has already diverged a little bit: if (const auto *File = Ty->getFile()) { StringIdRecord SIDR(TypeIndex(0x0), getFullFilepath(File)); TypeIndex SIDI = TypeTable.writeLeafType(SIDR); UdtSourceLineRecord USLR(ClassTI, SIDI, Ty->getLine()); TypeTable.writeLeafType(USLR); } addToUDTs(Ty); Comment Actions lgtm
|
We should call addToUDTs(Ty) here as a followup. MSVC emits S_UDT records for enums as well as typedefs, structs, etc.