-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
copy elision: implicit cast error set to error union runtime
```zig export fn entry() void { var x = error.Failure; var y: error!Foo = x; } ``` ```llvm define void @entry() #2 !dbg !42 { Entry: %x = alloca i16, align 2 %y = alloca { i16, %Foo }, align 4 store i16 1, i16* %x, align 2, !dbg !63 call void @llvm.dbg.declare(metadata i16* %x, metadata !46, metadata !DIExpression()), !dbg !64 %0 = load i16, i16* %x, align 2, !dbg !65 %1 = getelementptr inbounds { i16, %Foo }, { i16, %Foo }* %y, i32 0, i32 0, !dbg !66 store i16 %0, i16* %1, align 2, !dbg !65 call void @llvm.dbg.declare(metadata { i16, %Foo }* %y, metadata !48, metadata !DIExpression()), !dbg !66 ret void, !dbg !67 } ```
- Loading branch information
Showing
1 changed file
with
11 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters