From: Geoff Berry Date: Thu, 14 Dec 2017 18:35:59 +0000 (-0500) Subject: cmd/compile/internal/ssa: group dump files alphabetically X-Git-Tag: go1.10beta2~103 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=75f0ad705f9de544b74a35c2fbfc3417c497c8d6;p=gostls13.git cmd/compile/internal/ssa: group dump files alphabetically Change dump file names to group them alphabetically in directory listings, in pass run order. Change-Id: I8070578a5b4a3a7983dcc527ea1cfdb10a6d7d24 Reviewed-on: https://go-review.googlesource.com/83958 Reviewed-by: Keith Randall Run-TryBot: Keith Randall TryBot-Result: Gobot Gobot --- diff --git a/src/cmd/compile/fmt_test.go b/src/cmd/compile/fmt_test.go index 3f329dea9c..7342b5492b 100644 --- a/src/cmd/compile/fmt_test.go +++ b/src/cmd/compile/fmt_test.go @@ -673,6 +673,7 @@ var knownFormats = map[string]string{ "int %-12d": "", "int %-6d": "", "int %-8o": "", + "int %02d": "", "int %6d": "", "int %c": "", "int %d": "", diff --git a/src/cmd/compile/internal/ssa/compile.go b/src/cmd/compile/internal/ssa/compile.go index 8a2e358c11..82b9e2cbce 100644 --- a/src/cmd/compile/internal/ssa/compile.go +++ b/src/cmd/compile/internal/ssa/compile.go @@ -123,7 +123,7 @@ var dumpFileSeq int // output. func (f *Func) dumpFile(phaseName string) { dumpFileSeq++ - fname := fmt.Sprintf("%s__%s_%d.dump", phaseName, f.Name, dumpFileSeq) + fname := fmt.Sprintf("%s_%02d__%s.dump", f.Name, dumpFileSeq, phaseName) fname = strings.Replace(fname, " ", "_", -1) fname = strings.Replace(fname, "/", "_", -1) fname = strings.Replace(fname, ":", "_", -1)