aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/gc/bimport.go
blob: c0c18e728e6311c6525ffbbff15ddf0582c7c326 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package gc

import (
	"cmd/compile/internal/ir"
	"cmd/internal/src"
)

func npos(pos src.XPos, n ir.Node) ir.Node {
	n.SetPos(pos)
	return n
}

func builtinCall(op ir.Op) ir.Node {
	return ir.Nod(ir.OCALL, mkname(ir.BuiltinPkg.Lookup(ir.OpNames[op])), nil)
}