mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-14 07:53:40 +00:00
compiler; add position information to createConstant
Non-functional change. The position information will be used later to emit debug info locations to string constants.
This commit is contained in:
@@ -9,7 +9,7 @@ import "go/types"
|
||||
// runtime/volatile.LoadT().
|
||||
func (b *builder) createVolatileLoad() {
|
||||
b.createFunctionStart(true)
|
||||
addr := b.getValue(b.fn.Params[0])
|
||||
addr := b.getValue(b.fn.Params[0], getPos(b.fn))
|
||||
b.createNilCheck(b.fn.Params[0], addr, "deref")
|
||||
valType := b.getLLVMType(b.fn.Params[0].Type().(*types.Pointer).Elem())
|
||||
val := b.CreateLoad(valType, addr, "")
|
||||
@@ -21,8 +21,8 @@ func (b *builder) createVolatileLoad() {
|
||||
// runtime/volatile.StoreT().
|
||||
func (b *builder) createVolatileStore() {
|
||||
b.createFunctionStart(true)
|
||||
addr := b.getValue(b.fn.Params[0])
|
||||
val := b.getValue(b.fn.Params[1])
|
||||
addr := b.getValue(b.fn.Params[0], getPos(b.fn))
|
||||
val := b.getValue(b.fn.Params[1], getPos(b.fn))
|
||||
b.createNilCheck(b.fn.Params[0], addr, "deref")
|
||||
store := b.CreateStore(val, addr)
|
||||
store.SetVolatile(true)
|
||||
|
||||
Reference in New Issue
Block a user