diff options
| author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-09-16 15:47:21 +0000 |
|---|---|---|
| committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-09-16 15:47:21 +0000 |
| commit | 49b4e44b7d540fa846d353b10237848a67789cbf (patch) | |
| tree | ea2b52e3c258d6b6d9356977c683c7f72a4a5fd5 /libgo/go/debug/dwarf | |
| parent | 82ceb8f6a88a0193971f53e0571e017f2764f7d7 (diff) | |
| download | ppe42-gcc-49b4e44b7d540fa846d353b10237848a67789cbf.tar.gz ppe42-gcc-49b4e44b7d540fa846d353b10237848a67789cbf.zip | |
Update Go library to r60.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178910 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/go/debug/dwarf')
| -rw-r--r-- | libgo/go/debug/dwarf/type.go | 17 | ||||
| -rw-r--r-- | libgo/go/debug/dwarf/type_test.go | 1 |
2 files changed, 9 insertions, 9 deletions
diff --git a/libgo/go/debug/dwarf/type.go b/libgo/go/debug/dwarf/type.go index 902a545f860..f35365ebeb0 100644 --- a/libgo/go/debug/dwarf/type.go +++ b/libgo/go/debug/dwarf/type.go @@ -352,8 +352,8 @@ func (d *Data) Type(off Offset) (Type, os.Error) { } } if ndim == 0 { - err = DecodeError{"info", e.Offset, "missing dimension for array"} - goto Error + // LLVM generates this for x[]. + t.Count = -1 } case TagBaseType: @@ -523,7 +523,7 @@ func (d *Data) Type(off Offset) (Type, os.Error) { // Attributes: // AttrType: type of return value if any // AttrName: possible name of type [ignored] - // AttrPrototyped: whether used ANSI C prototye [ignored] + // AttrPrototyped: whether used ANSI C prototype [ignored] // Children: // TagFormalParameter: typed parameter // AttrType: type of parameter @@ -566,12 +566,13 @@ func (d *Data) Type(off Offset) (Type, os.Error) { goto Error } - b, ok := e.Val(AttrByteSize).(int64) - if !ok { - b = -1 + { + b, ok := e.Val(AttrByteSize).(int64) + if !ok { + b = -1 + } + typ.Common().ByteSize = b } - typ.Common().ByteSize = b - return typ, nil Error: diff --git a/libgo/go/debug/dwarf/type_test.go b/libgo/go/debug/dwarf/type_test.go index e01f7353a4d..b9470a4fcb4 100644 --- a/libgo/go/debug/dwarf/type_test.go +++ b/libgo/go/debug/dwarf/type_test.go @@ -58,7 +58,6 @@ func machoData(t *testing.T, name string) *Data { return d } - func TestTypedefsELF(t *testing.T) { testTypedefs(t, elfData(t, "testdata/typedef.elf")) } func TestTypedefsMachO(t *testing.T) { |

