Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Commit 83f4279

Browse files
committed
[CodeView] Use the right type index for long long
We used T_INT8 instead of T_QUAD. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271497 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 81d9dfc commit 83f4279

File tree

3 files changed

+33
-22
lines changed

3 files changed

+33
-22
lines changed

include/llvm/DebugInfo/CodeView/TypeIndex.h

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ enum class SimpleTypeKind : uint32_t {
4444
UInt64Quad = 0x0023, // 64 bit unsigned
4545
Int64 = 0x0076, // 64 bit signed int
4646
UInt64 = 0x0077, // 64 bit unsigned int
47+
Int128Oct = 0x0014, // 128 bit signed int
48+
UInt128Oct = 0x0024, // 128 bit unsigned int
4749
Int128 = 0x0078, // 128 bit signed int
4850
UInt128 = 0x0079, // 128 bit unsigned int
4951

@@ -55,15 +57,19 @@ enum class SimpleTypeKind : uint32_t {
5557
Float80 = 0x0042, // 80 bit real
5658
Float128 = 0x0043, // 128 bit real
5759

58-
Complex32 = 0x0050, // 32 bit complex
59-
Complex64 = 0x0051, // 64 bit complex
60-
Complex80 = 0x0052, // 80 bit complex
61-
Complex128 = 0x0053, // 128 bit complex
62-
63-
Boolean8 = 0x0030, // 8 bit boolean
64-
Boolean16 = 0x0031, // 16 bit boolean
65-
Boolean32 = 0x0032, // 32 bit boolean
66-
Boolean64 = 0x0033 // 64 bit boolean
60+
Complex16 = 0x0056, // 16 bit complex
61+
Complex32 = 0x0050, // 32 bit complex
62+
Complex32PartialPrecision = 0x0055, // 32 bit PP complex
63+
Complex48 = 0x0054, // 48 bit complex
64+
Complex64 = 0x0051, // 64 bit complex
65+
Complex80 = 0x0052, // 80 bit complex
66+
Complex128 = 0x0053, // 128 bit complex
67+
68+
Boolean8 = 0x0030, // 8 bit boolean
69+
Boolean16 = 0x0031, // 16 bit boolean
70+
Boolean32 = 0x0032, // 32 bit boolean
71+
Boolean64 = 0x0033, // 64 bit boolean
72+
Boolean128 = 0x0034, // 128 bit boolean
6773
};
6874

6975
enum class SimpleTypeMode : uint32_t {

lib/CodeGen/AsmPrinter/CodeViewDebug.cpp

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -775,14 +775,16 @@ TypeIndex CodeViewDebug::lowerTypeBasic(const DIBasicType *Ty) {
775775
break;
776776
case dwarf::DW_ATE_boolean:
777777
switch (ByteSize) {
778-
case 1: STK = SimpleTypeKind::Boolean8; break;
779-
case 2: STK = SimpleTypeKind::Boolean16; break;
780-
case 4: STK = SimpleTypeKind::Boolean32; break;
781-
case 8: STK = SimpleTypeKind::Boolean64; break;
778+
case 1: STK = SimpleTypeKind::Boolean8; break;
779+
case 2: STK = SimpleTypeKind::Boolean16; break;
780+
case 4: STK = SimpleTypeKind::Boolean32; break;
781+
case 8: STK = SimpleTypeKind::Boolean64; break;
782+
case 16: STK = SimpleTypeKind::Boolean128; break;
782783
}
783784
break;
784785
case dwarf::DW_ATE_complex_float:
785786
switch (ByteSize) {
787+
case 2: STK = SimpleTypeKind::Complex16; break;
786788
case 4: STK = SimpleTypeKind::Complex32; break;
787789
case 8: STK = SimpleTypeKind::Complex64; break;
788790
case 10: STK = SimpleTypeKind::Complex80; break;
@@ -791,6 +793,7 @@ TypeIndex CodeViewDebug::lowerTypeBasic(const DIBasicType *Ty) {
791793
break;
792794
case dwarf::DW_ATE_float:
793795
switch (ByteSize) {
796+
case 2: STK = SimpleTypeKind::Float16; break;
794797
case 4: STK = SimpleTypeKind::Float32; break;
795798
case 6: STK = SimpleTypeKind::Float48; break;
796799
case 8: STK = SimpleTypeKind::Float64; break;
@@ -800,18 +803,20 @@ TypeIndex CodeViewDebug::lowerTypeBasic(const DIBasicType *Ty) {
800803
break;
801804
case dwarf::DW_ATE_signed:
802805
switch (ByteSize) {
803-
case 1: STK = SimpleTypeKind::SByte; break;
804-
case 2: STK = SimpleTypeKind::Int16Short; break;
805-
case 4: STK = SimpleTypeKind::Int32; break;
806-
case 8: STK = SimpleTypeKind::Int64; break;
806+
case 1: STK = SimpleTypeKind::SByte; break;
807+
case 2: STK = SimpleTypeKind::Int16Short; break;
808+
case 4: STK = SimpleTypeKind::Int32; break;
809+
case 8: STK = SimpleTypeKind::Int64Quad; break;
810+
case 16: STK = SimpleTypeKind::Int128Oct; break;
807811
}
808812
break;
809813
case dwarf::DW_ATE_unsigned:
810814
switch (ByteSize) {
811-
case 1: STK = SimpleTypeKind::Byte; break;
812-
case 2: STK = SimpleTypeKind::UInt16Short; break;
813-
case 4: STK = SimpleTypeKind::UInt32; break;
814-
case 8: STK = SimpleTypeKind::UInt64; break;
815+
case 1: STK = SimpleTypeKind::Byte; break;
816+
case 2: STK = SimpleTypeKind::UInt16Short; break;
817+
case 4: STK = SimpleTypeKind::UInt32; break;
818+
case 8: STK = SimpleTypeKind::UInt64Quad; break;
819+
case 16: STK = SimpleTypeKind::UInt128Oct; break;
815820
}
816821
break;
817822
case dwarf::DW_ATE_UTF:

test/DebugInfo/COFF/types-basic.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
; CHECK: LinkageName: ?f@@YAXMN_J@Z
9393
; CHECK: }
9494
; CHECK: Local {
95-
; CHECK: Type: __int64 (0x76)
95+
; CHECK: Type: __int64 (0x13)
9696
; CHECK: Flags [ (0x1)
9797
; CHECK: IsParameter (0x1)
9898
; CHECK: ]

0 commit comments

Comments
 (0)