diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-06-10 11:15:32 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-06-10 11:15:32 -0400 |
| commit | 1a51bf63047e9a3cd6ae3273296fded82009235c (patch) | |
| tree | a0ed33775740c091baad17c8dffdc5c9c272cefb /src/parser.cpp | |
| parent | 4e2b2822f18577edb614bdc3ec6808a0587662e5 (diff) | |
| download | zig-1a51bf63047e9a3cd6ae3273296fded82009235c.tar.gz zig-1a51bf63047e9a3cd6ae3273296fded82009235c.zip | |
hook up result locations for union initializations
```zig
export fn entry() void {
var x = Foo{ .bar = bar() };
}
```
```llvm
define void @entry() #2 !dbg !44 {
Entry:
%x = alloca %Foo, align 4
%0 = getelementptr inbounds %Foo, %Foo* %x, i32 0, i32 1, !dbg !68
store i1 true, i1* %0, align 1, !dbg !68
%1 = getelementptr inbounds %Foo, %Foo* %x, i32 0, i32 0, !dbg !68
%2 = bitcast { i32, [4 x i8] }* %1 to %Bar*, !dbg !68
call fastcc void @bar(%Bar* sret %2), !dbg !68
call void @llvm.dbg.declare(metadata %Foo* %x, metadata !48, metadata !DIExpression()), !dbg !69
ret void, !dbg !70
}
```
Diffstat (limited to 'src/parser.cpp')
0 files changed, 0 insertions, 0 deletions
