# no-copy semantics for basic runtime function call variable init · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/5e1003bc81466b8ca0e3a3adb613bac8f34f2712)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 5e1003bc81466b8ca0e3a3adb613bac8f34f2712

Requested commit: 5e1003bc81466b8ca0e3a3adb613bac8f34f2712

Commit: 5e1003bc81466b8ca0e3a3adb613bac8f34f2712

Tree: ef7de5e4cb6dfeaad96fee7b935e1459a6dce063

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

````
no-copy semantics for basic runtime function call variable init

```zig
export fn entry() void {
    var x: Foo = foo();
}
```

```llvm
define void @entry() #2 !dbg !37 {
Entry:
  %x = alloca %Foo, align 4
  call fastcc void @foo(%Foo* sret %x), !dbg !48
  call void @llvm.dbg.declare(metadata %Foo* %x, metadata !41, metadata !DIExpression()), !dbg !49
  ret void, !dbg !50
}
```

````

## Parents

- [0ccd91faea5ec27a1dce9d3bae84e1feca7fc0ea](https://git.cafe/gitcafe/zig/commit/0ccd91faea5ec27a1dce9d3bae84e1feca7fc0ea?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/5e1003bc81466b8ca0e3a3adb613bac8f34f2712?format=markdown)
