CL 187617 removed oldescape_linkname.go, but forgot to remove this
directory too.
Change-Id: I6d208c4d96d636b3df93adec1ee22fe1d4f5f61d
Reviewed-on: https://go-review.googlesource.com/c/go/+/395259
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
+++ /dev/null
-package x
-
-func indexByte(xs []byte, b byte) int { // ERROR "indexByte xs does not escape"
- for i, x := range xs {
- if x == b {
- return i
- }
- }
- return -1
-}
+++ /dev/null
-package y
-
-import _ "unsafe"
-
-//go:linkname byteIndex linkname1.indexByte
-func byteIndex(xs []byte, b byte) int
-
-func ContainsSlash(data []byte) bool { // ERROR "leaking param: data" "can inline ContainsSlash"
- if byteIndex(data, '/') != -1 {
- return true
- }
- return false
-}
+++ /dev/null
-package main
-
-import _ "./linkname1"
-import "./linkname2"
-
-func main() { // ERROR "can inline main"
- str := "hello/world"
- bs := []byte(str) // ERROR "\(\[\]byte\)\(str\) escapes to heap"
- if y.ContainsSlash(bs) { // ERROR "inlining call to y.ContainsSlash"
- }
-}