We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7717ac1 commit 2cea6cdCopy full SHA for 2cea6cd
src/cmd/internal/obj/inl.go
@@ -109,8 +109,9 @@ func (ctxt *Link) InnermostPos(xpos src.XPos) src.Pos {
109
}
110
111
// AllPos returns a slice of the positions inlined at xpos, from
112
-// innermost (index zero) to outermost. To avoid gratuitous allocation
113
-// the result is passed in and extended if necessary.
+// innermost (index zero) to outermost. To avoid allocation
+// the input slice is truncated, and used for the result, extended
114
+// as necessary.
115
func (ctxt *Link) AllPos(xpos src.XPos, result []src.Pos) []src.Pos {
116
pos := ctxt.InnermostPos(xpos)
117
result = result[:0]
0 commit comments