build: Commentf function

Convenience for adding a comment generated with fmt.Sprintf.

Updates #41
This commit is contained in:
Michael McLoughlin
2019-01-11 10:51:32 -08:00
parent 284ee13ada
commit 94033059eb
2 changed files with 9 additions and 0 deletions

View File

@@ -128,5 +128,8 @@ func Label(name string) { ctx.Label(name) }
// Comment adds comment lines to the active function.
func Comment(lines ...string) { ctx.Comment(lines...) }
// Commentf adds a formtted comment line.
func Commentf(format string, a ...interface{}) { ctx.Commentf(format, a...) }
// ConstData builds a static data section containing just the given constant.
func ConstData(name string, v operand.Constant) operand.Mem { return ctx.ConstData(name, v) }