diff options
| author | Russ Cox <rsc@golang.org> | 2014-10-03 12:22:19 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2014-10-03 12:22:19 -0400 |
| commit | 904ec0098137f742e0dd96da3bc033d6a0b615d1 (patch) | |
| tree | 6a05a91443927524fcb78ac82df0142d8e6ae71f /src/debug/dwarf | |
| parent | d42328c9f749140adf947833e0381fc639c32737 (diff) | |
| parent | c65a47f890e33eeed6ee9d8b6d965a5534fb6e0e (diff) | |
| download | go-904ec0098137f742e0dd96da3bc033d6a0b615d1.tar.xz | |
[dev.garbage] merge default into dev.garbage
Diffstat (limited to 'src/debug/dwarf')
| -rw-r--r-- | src/debug/dwarf/type.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/debug/dwarf/type.go b/src/debug/dwarf/type.go index fa40b2bef1..6986b19e72 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: |
