]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/internal/obj: remove redundant code in genFuncInfoSyms
authorxiongwy12 <107687876+xiongwy12@users.noreply.github.com>
Mon, 15 Aug 2022 15:52:40 +0000 (15:52 +0000)
committerGopher Robot <gobot@golang.org>
Mon, 15 Aug 2022 18:52:17 +0000 (18:52 +0000)
The length of slice hashedsyms is always 0, because it's not used after defined

Change-Id: Iba8e263aedfa403d5688678a1b37c2be3119eb7f
GitHub-Last-Rev: c236c4a48268ef1cdd9daa1e62c7004a7bde1d27
GitHub-Pull-Request: golang/go#53450
Reviewed-on: https://go-review.googlesource.com/c/go/+/413234
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Run-TryBot: guangyuan zhou <zhouguangyuan@golangcn.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>

src/cmd/internal/obj/objfile.go

index ec699a79516e0f4cfe1c1514e21f3d3a4ca0220f..729c5127b38eee0fbf29e3588f7c1965bafa2df0 100644 (file)
@@ -698,7 +698,6 @@ func nAuxSym(s *LSym) int {
 // generate symbols for FuncInfo.
 func genFuncInfoSyms(ctxt *Link) {
        infosyms := make([]*LSym, 0, len(ctxt.Text))
-       hashedsyms := make([]*LSym, 0, 4*len(ctxt.Text))
        var b bytes.Buffer
        symidx := int32(len(ctxt.defs))
        for _, s := range ctxt.Text {
@@ -760,7 +759,6 @@ func genFuncInfoSyms(ctxt *Link) {
                }
        }
        ctxt.defs = append(ctxt.defs, infosyms...)
-       ctxt.hasheddefs = append(ctxt.hasheddefs, hashedsyms...)
 }
 
 func writeAuxSymDebug(ctxt *Link, par *LSym, aux *LSym) {