]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile/internal/ssa: group dump files alphabetically
authorGeoff Berry <gberry.qdt@qualcommdatacenter.com>
Thu, 14 Dec 2017 18:35:59 +0000 (13:35 -0500)
committerKeith Randall <khr@golang.org>
Thu, 14 Dec 2017 21:22:04 +0000 (21:22 +0000)
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 <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/compile/fmt_test.go
src/cmd/compile/internal/ssa/compile.go

index 3f329dea9cc6e0e5f0351f7dfc4d6befec433307..7342b5492bf59c79f2ad62dedf7bf140620d6f39 100644 (file)
@@ -673,6 +673,7 @@ var knownFormats = map[string]string{
        "int %-12d":                                       "",
        "int %-6d":                                        "",
        "int %-8o":                                        "",
+       "int %02d":                                        "",
        "int %6d":                                         "",
        "int %c":                                          "",
        "int %d":                                          "",
index 8a2e358c118e191ef40a1be19bd9df01140d4de0..82b9e2cbce8d1461fd0a154d62bc59eafce2bcc1 100644 (file)
@@ -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)