mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: implement fmt.Formatter for Val formats %s, %v
Change-Id: Id56e886793161b48b445439e9a12109142064d3f Reviewed-on: https://go-review.googlesource.com/28332 Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
9e1f6a326e
commit
97ba3c8242
3 changed files with 41 additions and 28 deletions
|
|
@ -382,7 +382,7 @@ func dumpasmhdr() {
|
|||
}
|
||||
switch n.Op {
|
||||
case OLITERAL:
|
||||
fmt.Fprintf(b, "#define const_%s %v\n", n.Sym.Name, vconv(n.Val(), FmtSharp))
|
||||
fmt.Fprintf(b, "#define const_%s %#v\n", n.Sym.Name, n.Val())
|
||||
|
||||
case OTYPE:
|
||||
t := n.Type
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue