mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.link] cmd/link: remove the second result of MakeSymbolUpdater
With unique global indices, MakeSymbolUpdater will not change the symbol's index. So no need to return a new index. Change-Id: I5b4fd6a0167cc74476880bbf4382c524ecde7721 Reviewed-on: https://go-review.googlesource.com/c/go/+/219227 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jeremy Faller <jeremy@golang.org> Reviewed-by: Than McIntosh <thanm@google.com>
This commit is contained in:
parent
5a8b1509dd
commit
112a7cb82c
8 changed files with 70 additions and 72 deletions
|
|
@ -36,9 +36,8 @@ func (l *Loader) MakeSymbolBuilder(name string) *SymbolBuilder {
|
|||
// symbol 'symIdx'. If 'symIdx' is not an external symbol, then create
|
||||
// a clone of it (copy name, properties, etc) fix things up so that
|
||||
// the lookup tables and caches point to the new version, not the old
|
||||
// version. Returns a SymbolBuilder and a Sym (which may be different
|
||||
// from the original if we had to clone).
|
||||
func (l *Loader) MakeSymbolUpdater(symIdx Sym) (*SymbolBuilder, Sym) {
|
||||
// version.
|
||||
func (l *Loader) MakeSymbolUpdater(symIdx Sym) *SymbolBuilder {
|
||||
if symIdx == 0 {
|
||||
panic("can't update the null symbol")
|
||||
}
|
||||
|
|
@ -53,7 +52,7 @@ func (l *Loader) MakeSymbolUpdater(symIdx Sym) (*SymbolBuilder, Sym) {
|
|||
// Construct updater and return.
|
||||
sb := &SymbolBuilder{l: l, symIdx: symIdx}
|
||||
sb.extSymPayload = l.getPayload(symIdx)
|
||||
return sb, symIdx
|
||||
return sb
|
||||
}
|
||||
|
||||
// Getters for properties of the symbol we're working on.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue