This is meant to be the tiniest step towards DIType to CV type index
translation that I could come up with. Whenever translation fails, we use type
index zero, which is the unknown type.
Details
Diff Detail
Event Timeline
lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | ||
---|---|---|
811–812 | else if (ByteSize == 2) STK = SimpleTypeKind::Character16; else if (ByteSize == 4) STK = SimpleTypeKind::Character32; Is there any way to distinguish wchar_t from DW_ATE_unsigned_char with ByteSize == 2? |
lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | ||
---|---|---|
811–812 | The BasicType's name maybe? |
lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | ||
---|---|---|
857–859 | Is this true? Surely there has to be a PointerOptions on a non member pointer. |
lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | ||
---|---|---|
780 | Eh, let's remove it. I'll give you a dollar if a real user complains in the next year. | |
811–812 | Ooh, all the character types are all messed up. That needs real work... Added some stuff. | |
857–859 | It's related to method 'this' pointers, not member pointers. This is the test case I can use to get them to fill in PointerOptions: struct A { const int *a; void f() const; }; void A::f() const {} A a; It's used for the const qualification on the 'this' parameter of A::f, but not the const qualifier on the const int *a; field. In that case, they use an LF_MODIFIER record. | |
895–897 | Yeah, there's unaligned and also a similar issue with __restrict. I can't convince MSVC to set IsFlat, so I left it off. |
Yes.
What about /J ?
They don't change their type emission. If you explicitly wrote signed/unsigned, you get SignedCharacter/UnsignedCharacter. If you don't, you get NarrowCharacter. Our approach of checking the name give the same behavior.
lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | ||
---|---|---|
824–827 | I don't see a test for this. long x; gives me "long int". |
LGTM!
We should have a todo for:
using HRESULT = long; HRESULT an_hresult;
MSVC emits:
(000070) S_GDATA32: [0000:00000000], Type: T_HRESULT(0008), an_hresult
lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | ||
---|---|---|
757 | Divide by eight for consistency? |
Amjad, I went ahead and landed this. I know it conflicts with what you're working on, but I didn't see any updates at http://reviews.llvm.org/D20435 and this is the most important thing for me to work on. Hopefully we agree on the direction we're going here, I'll try to work very incrementally and CC you on every patch. I was going to look at POD structs (ignoring C++ methods) and function types next.
Divide by eight for consistency?