Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
no-copy semantics for peer result function calls
```zig export fn entry() void { var c = true; var x = if (c) foo() else bar(); } ``` ```llvm define void @entry() #2 !dbg !35 { Entry: %c = alloca i1, align 1 %x = alloca %Foo, align 4 store i1 true, i1* %c, align 1, !dbg !47 call void @llvm.dbg.declare(metadata i1* %c, metadata !39, metadata !DIExpression()), !dbg !48 %0 = load i1, i1* %c, align 1, !dbg !49 br i1 %0, label %Then, label %Else, !dbg !49 Then: ; preds = %Entry call fastcc void @foo(%Foo* sret %x), !dbg !50 br label %EndIf, !dbg !51 Else: ; preds = %Entry call fastcc void @bar(%Foo* sret %x), !dbg !52 br label %EndIf, !dbg !51 EndIf: ; preds = %Else, %Then call void @llvm.dbg.declare(metadata %Foo* %x, metadata !42, metadata !DIExpression()), !dbg !53 ret void, !dbg !54 } ```
- Loading branch information
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
Sorry, something went wrong.