| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302 |
- // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
- // Exceptions. See /LICENSE for license information.
- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
- //
- // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/full.carbon
- //
- // AUTOUPDATE
- // TIP: To test this file alone, run:
- // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/lower/testdata/for/bindings.carbon
- // TIP: To dump output, run:
- // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/lower/testdata/for/bindings.carbon
- class EmptyRange(T:! Core.Copy & Core.Destroy) {
- impl as Core.Iterate where .CursorType = {} and .ElementType = T {
- fn NewCursor[unused self: Self]() -> {} {
- return {};
- }
- fn Next[unused self: Self](_: {}*) -> Core.Optional(T) {
- return Core.Optional(T).None();
- }
- }
- }
- fn F(m: i32, n: i32*);
- fn For() {
- var r: EmptyRange((i32, i32)) = {};
- for ((m: i32, var n: i32) in r) {
- F(m, &n);
- }
- }
- // CHECK:STDOUT: ; ModuleID = 'bindings.carbon'
- // CHECK:STDOUT: source_filename = "bindings.carbon"
- // CHECK:STDOUT:
- // CHECK:STDOUT: @EmptyRange.val.loc27_3 = internal constant {} zeroinitializer
- // CHECK:STDOUT:
- // CHECK:STDOUT: declare void @_CF.Main(i32, ptr)
- // CHECK:STDOUT:
- // CHECK:STDOUT: ; Function Attrs: nounwind
- // CHECK:STDOUT: define void @_CFor.Main() #0 !dbg !4 {
- // CHECK:STDOUT: entry:
- // CHECK:STDOUT: %r.var = alloca {}, align 8, !dbg !7
- // CHECK:STDOUT: %var = alloca {}, align 8, !dbg !8
- // CHECK:STDOUT: %.loc29_33.1.temp = alloca <{ { i32, i32 }, i1 }>, align 8, !dbg !8
- // CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !9
- // CHECK:STDOUT: %.loc29_33.8.temp = alloca { i32, i32 }, align 8, !dbg !8
- // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %r.var), !dbg !7
- // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %r.var, ptr align 1 @EmptyRange.val.loc27_3, i64 0, i1 false), !dbg !7
- // CHECK:STDOUT: call void @"_CNewCursor.EmptyRange.1ccc388edee5a786.Main:Iterate.Core.8d745d19e7d6c4bd"(ptr %r.var), !dbg !8
- // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var), !dbg !8
- // CHECK:STDOUT: br label %for.next, !dbg !8
- // CHECK:STDOUT:
- // CHECK:STDOUT: for.next: ; preds = %for.body, %entry
- // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc29_33.1.temp), !dbg !8
- // CHECK:STDOUT: call void @"_CNext.EmptyRange.1ccc388edee5a786.Main:Iterate.Core.8d745d19e7d6c4bd"(ptr %.loc29_33.1.temp, ptr %r.var, ptr %var), !dbg !8
- // CHECK:STDOUT: %Optional.HasValue.call = call i1 @_CHasValue.Optional.Core.6b64456bb8003a40(ptr %.loc29_33.1.temp), !dbg !8
- // CHECK:STDOUT: br i1 %Optional.HasValue.call, label %for.body, label %for.done, !dbg !8
- // CHECK:STDOUT:
- // CHECK:STDOUT: for.body: ; preds = %for.next
- // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !9
- // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc29_33.8.temp), !dbg !8
- // CHECK:STDOUT: call void @_CGet.Optional.Core.6b64456bb8003a40(ptr %.loc29_33.8.temp, ptr %.loc29_33.1.temp), !dbg !8
- // CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc29_33.8.temp, i32 0, i32 0, !dbg !8
- // CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc29_33.8.temp, i32 0, i32 1, !dbg !8
- // CHECK:STDOUT: %.loc29_33.11 = load i32, ptr %tuple.elem0.tuple.elem, align 4, !dbg !8
- // CHECK:STDOUT: %.loc29_33.12 = load i32, ptr %tuple.elem1.tuple.elem, align 4, !dbg !8
- // CHECK:STDOUT: store i32 %.loc29_33.12, ptr %n.var, align 4, !dbg !9
- // CHECK:STDOUT: call void @_CF.Main(i32 %.loc29_33.11, ptr %n.var), !dbg !10
- // CHECK:STDOUT: br label %for.next, !dbg !11
- // CHECK:STDOUT:
- // CHECK:STDOUT: for.done: ; preds = %for.next
- // CHECK:STDOUT: call void @"_COp.8e354c83fe88ab86:core.Destroy.Core"(ptr %.loc29_33.8.temp), !dbg !8
- // CHECK:STDOUT: call void @"_COp.7e389eab4a7e5487:core.Destroy.Core"(ptr %n.var), !dbg !9
- // CHECK:STDOUT: call void @"_COp.9a6e0f157f6aaaf4:core.Destroy.Core"(ptr %.loc29_33.1.temp), !dbg !8
- // CHECK:STDOUT: call void @"_COp.a27a6de502cec337:core.Destroy.Core"(ptr %r.var), !dbg !7
- // CHECK:STDOUT: ret void, !dbg !12
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: ; Function Attrs: nounwind
- // CHECK:STDOUT: define weak_odr void @"_COp.7e389eab4a7e5487:core.Destroy.Core"(ptr %self) #0 !dbg !13 {
- // CHECK:STDOUT: entry:
- // CHECK:STDOUT: ret void, !dbg !19
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: ; Function Attrs: nounwind
- // CHECK:STDOUT: define weak_odr void @"_COp.8e354c83fe88ab86:core.Destroy.Core"(ptr %self) #0 !dbg !20 {
- // CHECK:STDOUT: entry:
- // CHECK:STDOUT: ret void, !dbg !26
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: ; Function Attrs: nounwind
- // CHECK:STDOUT: define weak_odr void @"_COp.eba7b12fbfc5bcf2:core.Destroy.Core"(ptr %self) #0 !dbg !27 {
- // CHECK:STDOUT: entry:
- // CHECK:STDOUT: ret void, !dbg !30
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: ; Function Attrs: nounwind
- // CHECK:STDOUT: define weak_odr void @"_COp.d0e333d8efe6ef1d:core.Destroy.Core"(ptr %self) #0 !dbg !31 {
- // CHECK:STDOUT: entry:
- // CHECK:STDOUT: ret void, !dbg !34
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: ; Function Attrs: nounwind
- // CHECK:STDOUT: define weak_odr void @"_COp.27527d1de6170640:core.Destroy.Core"(ptr %self) #0 !dbg !35 {
- // CHECK:STDOUT: entry:
- // CHECK:STDOUT: ret void, !dbg !38
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: ; Function Attrs: nounwind
- // CHECK:STDOUT: define weak_odr void @"_COp.9a6e0f157f6aaaf4:core.Destroy.Core"(ptr %self) #0 !dbg !39 {
- // CHECK:STDOUT: entry:
- // CHECK:STDOUT: ret void, !dbg !42
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: ; Function Attrs: nounwind
- // CHECK:STDOUT: define weak_odr void @"_COp.a27a6de502cec337:core.Destroy.Core"(ptr %self) #0 !dbg !43 {
- // CHECK:STDOUT: entry:
- // CHECK:STDOUT: ret void, !dbg !46
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
- // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1
- // CHECK:STDOUT:
- // CHECK:STDOUT: ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
- // CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #2
- // CHECK:STDOUT:
- // CHECK:STDOUT: ; Function Attrs: nounwind
- // CHECK:STDOUT: define linkonce_odr void @"_CNewCursor.EmptyRange.1ccc388edee5a786.Main:Iterate.Core.8d745d19e7d6c4bd"(ptr %self) #0 !dbg !47 {
- // CHECK:STDOUT: entry:
- // CHECK:STDOUT: ret void, !dbg !50
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: ; Function Attrs: nounwind
- // CHECK:STDOUT: define linkonce_odr void @"_CNext.EmptyRange.1ccc388edee5a786.Main:Iterate.Core.8d745d19e7d6c4bd"(ptr sret(<{ { i32, i32 }, i1 }>) %return, ptr %self, ptr %_) #0 !dbg !51 {
- // CHECK:STDOUT: entry:
- // CHECK:STDOUT: call void @_CNone.Optional.Core.6b64456bb8003a40(ptr %return), !dbg !57
- // CHECK:STDOUT: ret void, !dbg !58
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: ; Function Attrs: nounwind
- // CHECK:STDOUT: define linkonce_odr i1 @_CHasValue.Optional.Core.6b64456bb8003a40(ptr %self) #0 !dbg !59 {
- // CHECK:STDOUT: %1 = call i1 @"_CHas.3e8267224c5dc9c2:OptionalStorage.Core.8d745d19e7d6c4bd"(ptr %self), !dbg !65
- // CHECK:STDOUT: ret i1 %1, !dbg !66
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: ; Function Attrs: nounwind
- // CHECK:STDOUT: define linkonce_odr void @_CGet.Optional.Core.6b64456bb8003a40(ptr sret({ i32, i32 }) %return, ptr %self) #0 !dbg !67 {
- // CHECK:STDOUT: call void @"_CGet.3e8267224c5dc9c2:OptionalStorage.Core.8d745d19e7d6c4bd"(ptr %return, ptr %self), !dbg !70
- // CHECK:STDOUT: ret void, !dbg !71
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: ; Function Attrs: nounwind
- // CHECK:STDOUT: define linkonce_odr void @_CNone.Optional.Core.6b64456bb8003a40(ptr sret(<{ { i32, i32 }, i1 }>) %return) #0 !dbg !72 {
- // CHECK:STDOUT: call void @"_CNone.3e8267224c5dc9c2:OptionalStorage.Core.8d745d19e7d6c4bd"(ptr %return), !dbg !75
- // CHECK:STDOUT: ret void, !dbg !76
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: ; Function Attrs: nounwind
- // CHECK:STDOUT: define linkonce_odr i1 @"_CHas.3e8267224c5dc9c2:OptionalStorage.Core.8d745d19e7d6c4bd"(ptr %value) #0 !dbg !77 {
- // CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ { i32, i32 }, i1 }>, ptr %value, i32 0, i32 1, !dbg !80
- // CHECK:STDOUT: %1 = load i8, ptr %has_value, align 1, !dbg !80
- // CHECK:STDOUT: %2 = trunc i8 %1 to i1, !dbg !80
- // CHECK:STDOUT: ret i1 %2, !dbg !81
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: ; Function Attrs: nounwind
- // CHECK:STDOUT: define linkonce_odr void @"_CGet.3e8267224c5dc9c2:OptionalStorage.Core.8d745d19e7d6c4bd"(ptr sret({ i32, i32 }) %return, ptr %value) #0 !dbg !82 {
- // CHECK:STDOUT: %value1 = getelementptr inbounds nuw <{ { i32, i32 }, i1 }>, ptr %value, i32 0, i32 0, !dbg !85
- // CHECK:STDOUT: call void @"_COp.e4daa70d026fdea2:Copy.Core.3e36085cb869f630"(ptr %return, ptr %value1), !dbg !85
- // CHECK:STDOUT: ret void, !dbg !86
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: ; Function Attrs: nounwind
- // CHECK:STDOUT: define linkonce_odr void @"_CNone.3e8267224c5dc9c2:OptionalStorage.Core.8d745d19e7d6c4bd"(ptr sret(<{ { i32, i32 }, i1 }>) %return) #0 !dbg !87 {
- // CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ { i32, i32 }, i1 }>, ptr %return, i32 0, i32 1, !dbg !88
- // CHECK:STDOUT: store i8 0, ptr %has_value, align 1, !dbg !88
- // CHECK:STDOUT: ret void, !dbg !89
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: ; Function Attrs: nounwind
- // CHECK:STDOUT: define linkonce_odr void @"_COp.e4daa70d026fdea2:Copy.Core.3e36085cb869f630"(ptr sret({ i32, i32 }) %return, ptr %self) #0 !dbg !90 {
- // CHECK:STDOUT: %tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !94
- // CHECK:STDOUT: %tuple.elem.load = load i32, ptr %tuple.elem, align 4, !dbg !94
- // CHECK:STDOUT: %tuple.elem1 = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !95
- // CHECK:STDOUT: %tuple.elem2 = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !96
- // CHECK:STDOUT: %tuple.elem.load3 = load i32, ptr %tuple.elem2, align 4, !dbg !96
- // CHECK:STDOUT: %tuple.elem4 = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !95
- // CHECK:STDOUT: store i32 %tuple.elem.load, ptr %tuple.elem1, align 4, !dbg !95
- // CHECK:STDOUT: store i32 %tuple.elem.load3, ptr %tuple.elem4, align 4, !dbg !95
- // CHECK:STDOUT: ret void, !dbg !97
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: ; uselistorder directives
- // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 4, 3, 2, 1, 0 }
- // CHECK:STDOUT:
- // CHECK:STDOUT: attributes #0 = { nounwind }
- // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
- // CHECK:STDOUT: attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
- // CHECK:STDOUT:
- // CHECK:STDOUT: !llvm.module.flags = !{!0, !1}
- // CHECK:STDOUT: !llvm.dbg.cu = !{!2}
- // CHECK:STDOUT:
- // CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5}
- // CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3}
- // CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
- // CHECK:STDOUT: !3 = !DIFile(filename: "bindings.carbon", directory: "")
- // CHECK:STDOUT: !4 = distinct !DISubprogram(name: "For", linkageName: "_CFor.Main", scope: null, file: !3, line: 26, type: !5, spFlags: DISPFlagDefinition, unit: !2)
- // CHECK:STDOUT: !5 = !DISubroutineType(types: !6)
- // CHECK:STDOUT: !6 = !{null}
- // CHECK:STDOUT: !7 = !DILocation(line: 27, column: 3, scope: !4)
- // CHECK:STDOUT: !8 = !DILocation(line: 29, column: 7, scope: !4)
- // CHECK:STDOUT: !9 = !DILocation(line: 29, column: 17, scope: !4)
- // CHECK:STDOUT: !10 = !DILocation(line: 30, column: 5, scope: !4)
- // CHECK:STDOUT: !11 = !DILocation(line: 29, column: 3, scope: !4)
- // CHECK:STDOUT: !12 = !DILocation(line: 26, column: 1, scope: !4)
- // CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Op", linkageName: "_COp.7e389eab4a7e5487:core.Destroy.Core", scope: null, file: !3, line: 27, type: !14, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !17)
- // CHECK:STDOUT: !14 = !DISubroutineType(types: !15)
- // CHECK:STDOUT: !15 = !{null, !16}
- // CHECK:STDOUT: !16 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
- // CHECK:STDOUT: !17 = !{!18}
- // CHECK:STDOUT: !18 = !DILocalVariable(arg: 1, scope: !13, type: !16)
- // CHECK:STDOUT: !19 = !DILocation(line: 27, column: 10, scope: !13)
- // CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Op", linkageName: "_COp.8e354c83fe88ab86:core.Destroy.Core", scope: null, file: !3, line: 27, type: !21, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !24)
- // CHECK:STDOUT: !21 = !DISubroutineType(types: !22)
- // CHECK:STDOUT: !22 = !{null, !23}
- // CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64)
- // CHECK:STDOUT: !24 = !{!25}
- // CHECK:STDOUT: !25 = !DILocalVariable(arg: 1, scope: !20, type: !23)
- // CHECK:STDOUT: !26 = !DILocation(line: 27, column: 10, scope: !20)
- // CHECK:STDOUT: !27 = distinct !DISubprogram(name: "Op", linkageName: "_COp.eba7b12fbfc5bcf2:core.Destroy.Core", scope: null, file: !3, line: 29, type: !21, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !28)
- // CHECK:STDOUT: !28 = !{!29}
- // CHECK:STDOUT: !29 = !DILocalVariable(arg: 1, scope: !27, type: !23)
- // CHECK:STDOUT: !30 = !DILocation(line: 29, column: 7, scope: !27)
- // CHECK:STDOUT: !31 = distinct !DISubprogram(name: "Op", linkageName: "_COp.d0e333d8efe6ef1d:core.Destroy.Core", scope: null, file: !3, line: 29, type: !21, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !32)
- // CHECK:STDOUT: !32 = !{!33}
- // CHECK:STDOUT: !33 = !DILocalVariable(arg: 1, scope: !31, type: !23)
- // CHECK:STDOUT: !34 = !DILocation(line: 29, column: 7, scope: !31)
- // CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Op", linkageName: "_COp.27527d1de6170640:core.Destroy.Core", scope: null, file: !3, line: 29, type: !21, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !36)
- // CHECK:STDOUT: !36 = !{!37}
- // CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !35, type: !23)
- // CHECK:STDOUT: !38 = !DILocation(line: 29, column: 7, scope: !35)
- // CHECK:STDOUT: !39 = distinct !DISubprogram(name: "Op", linkageName: "_COp.9a6e0f157f6aaaf4:core.Destroy.Core", scope: null, file: !3, line: 29, type: !21, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !40)
- // CHECK:STDOUT: !40 = !{!41}
- // CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !39, type: !23)
- // CHECK:STDOUT: !42 = !DILocation(line: 29, column: 7, scope: !39)
- // CHECK:STDOUT: !43 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a27a6de502cec337:core.Destroy.Core", scope: null, file: !3, line: 27, type: !21, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !44)
- // CHECK:STDOUT: !44 = !{!45}
- // CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !43, type: !23)
- // CHECK:STDOUT: !46 = !DILocation(line: 27, column: 3, scope: !43)
- // CHECK:STDOUT: !47 = distinct !DISubprogram(name: "NewCursor", linkageName: "_CNewCursor.EmptyRange.1ccc388edee5a786.Main:Iterate.Core.8d745d19e7d6c4bd", scope: null, file: !3, line: 15, type: !21, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !48)
- // CHECK:STDOUT: !48 = !{!49}
- // CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !47, type: !23)
- // CHECK:STDOUT: !50 = !DILocation(line: 16, column: 7, scope: !47)
- // CHECK:STDOUT: !51 = distinct !DISubprogram(name: "Next", linkageName: "_CNext.EmptyRange.1ccc388edee5a786.Main:Iterate.Core.8d745d19e7d6c4bd", scope: null, file: !3, line: 18, type: !52, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !54)
- // CHECK:STDOUT: !52 = !DISubroutineType(types: !53)
- // CHECK:STDOUT: !53 = !{!23, !23, !23}
- // CHECK:STDOUT: !54 = !{!55, !56}
- // CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !51, type: !23)
- // CHECK:STDOUT: !56 = !DILocalVariable(arg: 2, scope: !51, type: !23)
- // CHECK:STDOUT: !57 = !DILocation(line: 19, column: 14, scope: !51)
- // CHECK:STDOUT: !58 = !DILocation(line: 19, column: 7, scope: !51)
- // CHECK:STDOUT: !59 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.6b64456bb8003a40", scope: null, file: !60, line: 33, type: !61, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63)
- // CHECK:STDOUT: !60 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "")
- // CHECK:STDOUT: !61 = !DISubroutineType(types: !62)
- // CHECK:STDOUT: !62 = !{!23, !23}
- // CHECK:STDOUT: !63 = !{!64}
- // CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !59, type: !23)
- // CHECK:STDOUT: !65 = !DILocation(line: 34, column: 12, scope: !59)
- // CHECK:STDOUT: !66 = !DILocation(line: 34, column: 5, scope: !59)
- // CHECK:STDOUT: !67 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.6b64456bb8003a40", scope: null, file: !60, line: 36, type: !61, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !68)
- // CHECK:STDOUT: !68 = !{!69}
- // CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !67, type: !23)
- // CHECK:STDOUT: !70 = !DILocation(line: 37, column: 12, scope: !67)
- // CHECK:STDOUT: !71 = !DILocation(line: 37, column: 5, scope: !67)
- // CHECK:STDOUT: !72 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.6b64456bb8003a40", scope: null, file: !60, line: 27, type: !73, spFlags: DISPFlagDefinition, unit: !2)
- // CHECK:STDOUT: !73 = !DISubroutineType(types: !74)
- // CHECK:STDOUT: !74 = !{!23}
- // CHECK:STDOUT: !75 = !DILocation(line: 28, column: 12, scope: !72)
- // CHECK:STDOUT: !76 = !DILocation(line: 28, column: 5, scope: !72)
- // CHECK:STDOUT: !77 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.3e8267224c5dc9c2:OptionalStorage.Core.8d745d19e7d6c4bd", scope: null, file: !60, line: 132, type: !61, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !78)
- // CHECK:STDOUT: !78 = !{!79}
- // CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !77, type: !23)
- // CHECK:STDOUT: !80 = !DILocation(line: 133, column: 12, scope: !77)
- // CHECK:STDOUT: !81 = !DILocation(line: 133, column: 5, scope: !77)
- // CHECK:STDOUT: !82 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.3e8267224c5dc9c2:OptionalStorage.Core.8d745d19e7d6c4bd", scope: null, file: !60, line: 135, type: !61, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !83)
- // CHECK:STDOUT: !83 = !{!84}
- // CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !82, type: !23)
- // CHECK:STDOUT: !85 = !DILocation(line: 136, column: 12, scope: !82)
- // CHECK:STDOUT: !86 = !DILocation(line: 136, column: 5, scope: !82)
- // CHECK:STDOUT: !87 = distinct !DISubprogram(name: "None", linkageName: "_CNone.3e8267224c5dc9c2:OptionalStorage.Core.8d745d19e7d6c4bd", scope: null, file: !60, line: 116, type: !73, spFlags: DISPFlagDefinition, unit: !2)
- // CHECK:STDOUT: !88 = !DILocation(line: 119, column: 5, scope: !87)
- // CHECK:STDOUT: !89 = !DILocation(line: 120, column: 5, scope: !87)
- // CHECK:STDOUT: !90 = distinct !DISubprogram(name: "Op", linkageName: "_COp.e4daa70d026fdea2:Copy.Core.3e36085cb869f630", scope: null, file: !91, line: 58, type: !61, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !92)
- // CHECK:STDOUT: !91 = !DIFile(filename: "{{.*}}/prelude/copy.carbon", directory: "")
- // CHECK:STDOUT: !92 = !{!93}
- // CHECK:STDOUT: !93 = !DILocalVariable(arg: 1, scope: !90, type: !23)
- // CHECK:STDOUT: !94 = !DILocation(line: 59, column: 13, scope: !90)
- // CHECK:STDOUT: !95 = !DILocation(line: 59, column: 12, scope: !90)
- // CHECK:STDOUT: !96 = !DILocation(line: 59, column: 26, scope: !90)
- // CHECK:STDOUT: !97 = !DILocation(line: 59, column: 5, scope: !90)
|