Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1112)

Delta Between Two Patch Sets: src/pkg/debug/dwarf/type.go

Issue 4607045: code review 4607045: cgo: handle new Apple LLVM-based gcc from Xcode 4.2 (Closed)
Left Patch Set: Created 12 years, 9 months ago
Right Patch Set: diff -r 83bf1e008e3e https://go.googlecode.com/hg Created 12 years, 9 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « src/cmd/cgo/gcc.go ('k') | src/pkg/debug/elf/file.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 // Copyright 2009 The Go Authors. All rights reserved. 1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 // DWARF type information structures. 5 // DWARF type information structures.
6 // The format is heavily biased toward C, but for simplicity 6 // The format is heavily biased toward C, but for simplicity
7 // the String methods use a pseudo-Go syntax. 7 // the String methods use a pseudo-Go syntax.
8 8
9 package dwarf 9 package dwarf
10 10
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 // Create new array type underneath this one. 345 // Create new array type underneath this one.
346 t.Type = &ArrayType{Type: t.Type, Count: max + 1} 346 t.Type = &ArrayType{Type: t.Type, Count: max + 1}
347 } 347 }
348 ndim++ 348 ndim++
349 case TagEnumerationType: 349 case TagEnumerationType:
350 err = DecodeError{"info", kid.Offset, "cannot ha ndle enumeration type as array bound"} 350 err = DecodeError{"info", kid.Offset, "cannot ha ndle enumeration type as array bound"}
351 goto Error 351 goto Error
352 } 352 }
353 } 353 }
354 if ndim == 0 { 354 if ndim == 0 {
355 » » » err = DecodeError{"info", e.Offset, "missing dimension f or array"} 355 » » » // LLVM generates this for x[].
356 » » » goto Error 356 » » » t.Count = -1
357 } 357 }
358 358
359 case TagBaseType: 359 case TagBaseType:
360 // Basic type. (DWARF v2 §5.1) 360 // Basic type. (DWARF v2 §5.1)
361 // Attributes: 361 // Attributes:
362 // AttrName: name of base type in programming language of t he compilation unit [required] 362 // AttrName: name of base type in programming language of t he compilation unit [required]
363 // AttrEncoding: encoding value for type (encFloat etc) [re quired] 363 // AttrEncoding: encoding value for type (encFloat etc) [re quired]
364 // AttrByteSize: size of type in bytes [required] 364 // AttrByteSize: size of type in bytes [required]
365 // AttrBitOffset: for sub-byte types, size in bits 365 // AttrBitOffset: for sub-byte types, size in bits
366 // AttrBitSize: for sub-byte types, bit offset of high orde r bit in the AttrByteSize bytes 366 // AttrBitSize: for sub-byte types, bit offset of high orde r bit in the AttrByteSize bytes
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 574
575 return typ, nil 575 return typ, nil
576 576
577 Error: 577 Error:
578 // If the parse fails, take the type out of the cache 578 // If the parse fails, take the type out of the cache
579 // so that the next call with this offset doesn't hit 579 // so that the next call with this offset doesn't hit
580 // the cache and return success. 580 // the cache and return success.
581 d.typeCache[off] = nil, false 581 d.typeCache[off] = nil, false
582 return nil, err 582 return nil, err
583 } 583 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b