Skip to content
Permalink
Browse files

pkg/csource: fix PRINTF removal

PRINTF now accepts arguments.
  • Loading branch information...
dvyukov committed Dec 26, 2018
1 parent 82c9e67 commit e747ec987b53b3b5ff8886c871f2c33a2a8e5631
Showing with 1 addition and 1 deletion.
  1. +1 −1 pkg/csource/csource.go
@@ -405,8 +405,8 @@ func (ctx *context) postProcess(result []byte) []byte {
result = regexp.MustCompile(`\t*NONFAILING\((.*)\);\n`).ReplaceAll(result, []byte("$1;\n"))
}
result = bytes.Replace(result, []byte("NORETURN"), nil, -1)
result = bytes.Replace(result, []byte("PRINTF"), nil, -1)
result = bytes.Replace(result, []byte("doexit("), []byte("exit("), -1)
result = regexp.MustCompile(`PRINTF\(.*?\)`).ReplaceAll(result, nil)
result = regexp.MustCompile(`\t*debug\((.*\n)*?.*\);\n`).ReplaceAll(result, nil)
result = regexp.MustCompile(`\t*debug_dump_data\((.*\n)*?.*\);\n`).ReplaceAll(result, nil)
result = regexp.MustCompile(`\t*exitf\((.*\n)*?.*\);\n`).ReplaceAll(result, []byte("\texit(1);\n"))

0 comments on commit e747ec9

Please sign in to comment.
You can’t perform that action at this time.