From f7e6986d6b9f230a6807383fc0e37d9042baa5bf Mon Sep 17 00:00:00 2001 From: xiongwy12 <107687876+xiongwy12@users.noreply.github.com> Date: Mon, 15 Aug 2022 15:52:40 +0000 Subject: [PATCH] cmd/internal/obj: remove redundant code in genFuncInfoSyms 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 TryBot-Result: Gopher Robot Reviewed-by: Keith Randall Run-TryBot: guangyuan zhou Reviewed-by: Ian Lance Taylor Run-TryBot: Ian Lance Taylor Reviewed-by: Keith Randall Auto-Submit: Ian Lance Taylor --- src/cmd/internal/obj/objfile.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/cmd/internal/obj/objfile.go b/src/cmd/internal/obj/objfile.go index ec699a7951..729c5127b3 100644 --- a/src/cmd/internal/obj/objfile.go +++ b/src/cmd/internal/obj/objfile.go @@ -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) {