diff options
author | Ayke van Laethem <[email protected]> | 2018-09-23 23:30:13 +0200 |
---|---|---|
committer | Ayke van Laethem <[email protected]> | 2018-09-23 23:30:13 +0200 |
commit | 453450f40df0889a133f4b41199ab7176b3d7e9d (patch) | |
tree | 465d569c78a0dd9fd6bd49d729275e7b9da7185c /ir | |
parent | 3076ad470e564a5a9b351345fc83acf9834e19cd (diff) | |
download | tinygo-453450f40df0889a133f4b41199ab7176b3d7e9d.tar.gz tinygo-453450f40df0889a133f4b41199ab7176b3d7e9d.zip |
ir: sort function pragmas
Diffstat (limited to 'ir')
-rw-r--r-- | ir/ir.go | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -223,6 +223,12 @@ func (f *Function) parsePragmas() { } parts := strings.Fields(comment.Text) switch parts[0] { + case "//go:export": + if len(parts) != 2 { + continue + } + f.linkName = parts[1] + f.exported = true case "//go:linkname": if len(parts) != 3 || parts[1] != f.Name() { continue @@ -242,12 +248,6 @@ func (f *Function) parsePragmas() { if hasUnsafeImport(f.Pkg.Pkg) { f.nobounds = true } - case "//go:export": - if len(parts) != 2 { - continue - } - f.linkName = parts[1] - f.exported = true } } } |