summaryrefslogtreecommitdiff
path: root/src/debug/dwarf/type.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/debug/dwarf/type.go')
-rw-r--r--src/debug/dwarf/type.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/debug/dwarf/type.go b/src/debug/dwarf/type.go
index fa40b2bef..6986b19e7 100644
--- a/src/debug/dwarf/type.go
+++ b/src/debug/dwarf/type.go
@@ -431,6 +431,17 @@ func (d *Data) readType(name string, r typeReader, off Offset, typeCache map[Off
typ = new(BoolType)
case encComplexFloat:
typ = new(ComplexType)
+ if name == "complex" {
+ // clang writes out 'complex' instead of 'complex float' or 'complex double'.
+ // clang also writes out a byte size that we can use to distinguish.
+ // See issue 8694.
+ switch byteSize, _ := e.Val(AttrByteSize).(int64); byteSize {
+ case 8:
+ name = "complex float"
+ case 16:
+ name = "complex double"
+ }
+ }
case encFloat:
typ = new(FloatType)
case encSigned: