cmd/compile: refresh builtin.go

The export data format was augmented with a new "unsafe-uintptr" tag
in https://golang.org/cl/18584, but builtin.go was not regenerated.

While here, add a test to make sure builtin.go stays up to date in the
future.

Change-Id: I4ae17da29f0855bef6ec0fcc10e7082c8427d39c
Reviewed-on: https://go-review.googlesource.com/19681
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
Matthew Dempsky 2016-02-18 16:44:06 -08:00
parent 5c5e8d4105
commit 9a184b22ee
3 changed files with 79 additions and 37 deletions

View file

@ -0,0 +1,31 @@
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package gc_test
import (
"bytes"
"internal/testenv"
"io/ioutil"
"os/exec"
"testing"
)
func TestBuiltin(t *testing.T) {
testenv.MustHaveGoRun(t)
old, err := ioutil.ReadFile("builtin.go")
if err != nil {
t.Fatal(err)
}
new, err := exec.Command("go", "run", "mkbuiltin.go", "-stdout").Output()
if err != nil {
t.Fatal(err)
}
if !bytes.Equal(old, new) {
t.Fatal("builtin.go out of date; run mkbuiltin.go")
}
}