compiler: open byte slice and string embeds using the absolute path
authorMichael Matloob <matloob@golang.org>
Fri, 12 Feb 2021 00:28:57 +0000 (19:28 -0500)
committerIan Lance Taylor <iant@golang.org>
Fri, 12 Feb 2021 19:18:32 +0000 (11:18 -0800)
commit9769564e7456453e2273071d0faa5aab2554ff78
tree3a471e8ee60b7be687ab7501f70379618adcf174
parentf3d7fd1475eb1ed2b3a39f988b33db176d4f7419
compiler: open byte slice and string embeds using the absolute path

The paths vector contains the names of the files that the embed_files_
map is keyed by. While the code processing embed.FS values looks up
the paths in the embed_files_ map, the code processing string and byte
slice embeds tries opening the files using their names directly. Look
up the full paths in the embed_files_ map when opening them.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/291429
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/embed.cc