iterate.carbon 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. //
  5. // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/full.carbon
  6. //
  7. // AUTOUPDATE
  8. // TIP: To test this file alone, run:
  9. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/lower/testdata/array/iterate.carbon
  10. // TIP: To dump output, run:
  11. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/lower/testdata/array/iterate.carbon
  12. fn G(n: i32);
  13. fn F() {
  14. let a: array(i32, 6) = (1, 2, 3, 4, 5, 6);
  15. for (n: i32 in a) {
  16. G(n);
  17. }
  18. }
  19. // CHECK:STDOUT: ; ModuleID = 'iterate.carbon'
  20. // CHECK:STDOUT: source_filename = "iterate.carbon"
  21. // CHECK:STDOUT:
  22. // CHECK:STDOUT: @array.loc16_43.22 = internal constant [6 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6]
  23. // CHECK:STDOUT:
  24. // CHECK:STDOUT: declare void @_CG.Main(i32)
  25. // CHECK:STDOUT:
  26. // CHECK:STDOUT: ; Function Attrs: nounwind
  27. // CHECK:STDOUT: define void @_CF.Main() #0 !dbg !4 {
  28. // CHECK:STDOUT: entry:
  29. // CHECK:STDOUT: %.loc16_43.3.temp = alloca [6 x i32], align 4, !dbg !7
  30. // CHECK:STDOUT: %var = alloca i32, align 4, !dbg !8
  31. // CHECK:STDOUT: %.loc17_19.1.temp = alloca { i32, i1 }, align 8, !dbg !8
  32. // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc16_43.3.temp), !dbg !7
  33. // CHECK:STDOUT: %.loc16_43.4.array.index = getelementptr inbounds [6 x i32], ptr %.loc16_43.3.temp, i32 0, i64 0, !dbg !7
  34. // CHECK:STDOUT: %.loc16_43.7.array.index = getelementptr inbounds [6 x i32], ptr %.loc16_43.3.temp, i32 0, i64 1, !dbg !7
  35. // CHECK:STDOUT: %.loc16_43.10.array.index = getelementptr inbounds [6 x i32], ptr %.loc16_43.3.temp, i32 0, i64 2, !dbg !7
  36. // CHECK:STDOUT: %.loc16_43.13.array.index = getelementptr inbounds [6 x i32], ptr %.loc16_43.3.temp, i32 0, i64 3, !dbg !7
  37. // CHECK:STDOUT: %.loc16_43.16.array.index = getelementptr inbounds [6 x i32], ptr %.loc16_43.3.temp, i32 0, i64 4, !dbg !7
  38. // CHECK:STDOUT: %.loc16_43.19.array.index = getelementptr inbounds [6 x i32], ptr %.loc16_43.3.temp, i32 0, i64 5, !dbg !7
  39. // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %.loc16_43.3.temp, ptr align 4 @array.loc16_43.22, i64 24, i1 false), !dbg !7
  40. // CHECK:STDOUT: %array_type.as.Iterate.impl.NewCursor.call = call i32 @"_CNewCursor.f06e388f4a5bd5ec:Iterate.Core.a21f6adcc8abe06c"(ptr %.loc16_43.3.temp), !dbg !8
  41. // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var), !dbg !8
  42. // CHECK:STDOUT: store i32 %array_type.as.Iterate.impl.NewCursor.call, ptr %var, align 4, !dbg !8
  43. // CHECK:STDOUT: br label %for.next, !dbg !8
  44. // CHECK:STDOUT:
  45. // CHECK:STDOUT: for.next: ; preds = %for.body, %entry
  46. // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc17_19.1.temp), !dbg !8
  47. // CHECK:STDOUT: call void @"_CNext.f06e388f4a5bd5ec:Iterate.Core.a21f6adcc8abe06c"(ptr %.loc17_19.1.temp, ptr %.loc16_43.3.temp, ptr %var), !dbg !8
  48. // CHECK:STDOUT: %Optional.HasValue.call = call i1 @_CHasValue.Optional.Core.9a253b43086de47c(ptr %.loc17_19.1.temp), !dbg !8
  49. // CHECK:STDOUT: br i1 %Optional.HasValue.call, label %for.body, label %for.done, !dbg !8
  50. // CHECK:STDOUT:
  51. // CHECK:STDOUT: for.body: ; preds = %for.next
  52. // CHECK:STDOUT: %Optional.Get.call = call i32 @_CGet.Optional.Core.9a253b43086de47c(ptr %.loc17_19.1.temp), !dbg !8
  53. // CHECK:STDOUT: call void @_CG.Main(i32 %Optional.Get.call), !dbg !9
  54. // CHECK:STDOUT: br label %for.next, !dbg !10
  55. // CHECK:STDOUT:
  56. // CHECK:STDOUT: for.done: ; preds = %for.next
  57. // CHECK:STDOUT: ret void, !dbg !11
  58. // CHECK:STDOUT: }
  59. // CHECK:STDOUT:
  60. // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
  61. // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1
  62. // CHECK:STDOUT:
  63. // CHECK:STDOUT: ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
  64. // CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #2
  65. // CHECK:STDOUT:
  66. // CHECK:STDOUT: ; Function Attrs: nounwind
  67. // CHECK:STDOUT: define linkonce_odr i32 @"_CNewCursor.f06e388f4a5bd5ec:Iterate.Core.a21f6adcc8abe06c"(ptr %self) #0 !dbg !12 {
  68. // CHECK:STDOUT: ret i32 0, !dbg !20
  69. // CHECK:STDOUT: }
  70. // CHECK:STDOUT:
  71. // CHECK:STDOUT: ; Function Attrs: nounwind
  72. // CHECK:STDOUT: define linkonce_odr void @"_CNext.f06e388f4a5bd5ec:Iterate.Core.a21f6adcc8abe06c"(ptr sret({ i32, i1 }) %return, ptr %self, ptr %cursor) #0 !dbg !21 {
  73. // CHECK:STDOUT: %1 = load i32, ptr %cursor, align 4, !dbg !27
  74. // CHECK:STDOUT: %2 = icmp slt i32 %1, 6, !dbg !27
  75. // CHECK:STDOUT: br i1 %2, label %3, label %7, !dbg !28
  76. // CHECK:STDOUT:
  77. // CHECK:STDOUT: 3: ; preds = %0
  78. // CHECK:STDOUT: call void @"_COp.Int.Core:Inc.Core.be1e879c1ad406d8"(ptr %cursor), !dbg !29
  79. // CHECK:STDOUT: %4 = load i32, ptr %cursor, align 4, !dbg !30
  80. // CHECK:STDOUT: %5 = sub i32 %4, 1, !dbg !30
  81. // CHECK:STDOUT: %array.index = getelementptr inbounds [6 x i32], ptr %self, i32 0, i32 %5, !dbg !31
  82. // CHECK:STDOUT: %6 = load i32, ptr %array.index, align 4, !dbg !31
  83. // CHECK:STDOUT: call void @_CSome.Optional.Core.9a253b43086de47c(ptr %return, i32 %6), !dbg !32
  84. // CHECK:STDOUT: ret void, !dbg !33
  85. // CHECK:STDOUT:
  86. // CHECK:STDOUT: 7: ; preds = %0
  87. // CHECK:STDOUT: call void @_CNone.Optional.Core.9a253b43086de47c(ptr %return), !dbg !34
  88. // CHECK:STDOUT: ret void, !dbg !35
  89. // CHECK:STDOUT: }
  90. // CHECK:STDOUT:
  91. // CHECK:STDOUT: ; Function Attrs: nounwind
  92. // CHECK:STDOUT: define linkonce_odr i1 @_CHasValue.Optional.Core.9a253b43086de47c(ptr %self) #0 !dbg !36 {
  93. // CHECK:STDOUT: %1 = call i1 @"_CHas.225258f1a45e9386:OptionalStorage.Core.5450dc8e8b8e0899"(ptr %self), !dbg !42
  94. // CHECK:STDOUT: ret i1 %1, !dbg !43
  95. // CHECK:STDOUT: }
  96. // CHECK:STDOUT:
  97. // CHECK:STDOUT: ; Function Attrs: nounwind
  98. // CHECK:STDOUT: define linkonce_odr i32 @_CGet.Optional.Core.9a253b43086de47c(ptr %self) #0 !dbg !44 {
  99. // CHECK:STDOUT: %1 = call i32 @"_CGet.225258f1a45e9386:OptionalStorage.Core.5450dc8e8b8e0899"(ptr %self), !dbg !47
  100. // CHECK:STDOUT: ret i32 %1, !dbg !48
  101. // CHECK:STDOUT: }
  102. // CHECK:STDOUT:
  103. // CHECK:STDOUT: ; Function Attrs: nounwind
  104. // CHECK:STDOUT: define linkonce_odr void @"_COp.Int.Core:Inc.Core.be1e879c1ad406d8"(ptr %self) #0 !dbg !49 {
  105. // CHECK:STDOUT: call void @"_COp:thunk.Int.Core:AddAssignWith.Core.dbc952efa35fc763"(ptr %self, i32 1), !dbg !55
  106. // CHECK:STDOUT: ret void, !dbg !56
  107. // CHECK:STDOUT: }
  108. // CHECK:STDOUT:
  109. // CHECK:STDOUT: ; Function Attrs: nounwind
  110. // CHECK:STDOUT: define linkonce_odr void @_CSome.Optional.Core.9a253b43086de47c(ptr sret({ i32, i1 }) %return, i32 %value) #0 !dbg !57 {
  111. // CHECK:STDOUT: call void @"_CSome.225258f1a45e9386:OptionalStorage.Core.5450dc8e8b8e0899"(ptr %return, i32 %value), !dbg !62
  112. // CHECK:STDOUT: ret void, !dbg !63
  113. // CHECK:STDOUT: }
  114. // CHECK:STDOUT:
  115. // CHECK:STDOUT: ; Function Attrs: nounwind
  116. // CHECK:STDOUT: define linkonce_odr void @_CNone.Optional.Core.9a253b43086de47c(ptr sret({ i32, i1 }) %return) #0 !dbg !64 {
  117. // CHECK:STDOUT: call void @"_CNone.225258f1a45e9386:OptionalStorage.Core.5450dc8e8b8e0899"(ptr %return), !dbg !67
  118. // CHECK:STDOUT: ret void, !dbg !68
  119. // CHECK:STDOUT: }
  120. // CHECK:STDOUT:
  121. // CHECK:STDOUT: ; Function Attrs: nounwind
  122. // CHECK:STDOUT: define linkonce_odr i1 @"_CHas.225258f1a45e9386:OptionalStorage.Core.5450dc8e8b8e0899"(ptr %value) #0 !dbg !69 {
  123. // CHECK:STDOUT: %has_value = getelementptr inbounds nuw { i32, i1 }, ptr %value, i32 0, i32 1, !dbg !72
  124. // CHECK:STDOUT: %1 = load i8, ptr %has_value, align 1, !dbg !72
  125. // CHECK:STDOUT: %2 = trunc i8 %1 to i1, !dbg !72
  126. // CHECK:STDOUT: ret i1 %2, !dbg !73
  127. // CHECK:STDOUT: }
  128. // CHECK:STDOUT:
  129. // CHECK:STDOUT: ; Function Attrs: nounwind
  130. // CHECK:STDOUT: define linkonce_odr i32 @"_CGet.225258f1a45e9386:OptionalStorage.Core.5450dc8e8b8e0899"(ptr %value) #0 !dbg !74 {
  131. // CHECK:STDOUT: %value1 = getelementptr inbounds nuw { i32, i1 }, ptr %value, i32 0, i32 0, !dbg !77
  132. // CHECK:STDOUT: %1 = load i32, ptr %value1, align 4, !dbg !77
  133. // CHECK:STDOUT: ret i32 %1, !dbg !78
  134. // CHECK:STDOUT: }
  135. // CHECK:STDOUT:
  136. // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind
  137. // CHECK:STDOUT: define linkonce_odr void @"_COp:thunk.Int.Core:AddAssignWith.Core.dbc952efa35fc763"(ptr %self, i32 %other) #3 !dbg !79 {
  138. // CHECK:STDOUT: %1 = call i32 @"_CConvert.02bbc8f98b95ea6d:ImplicitAs.Core.5854fed63e66a74b"(i32 %other), !dbg !85
  139. // CHECK:STDOUT: %2 = load i32, ptr %self, align 4, !dbg !86
  140. // CHECK:STDOUT: %3 = add i32 %2, %1, !dbg !86
  141. // CHECK:STDOUT: store i32 %3, ptr %self, align 4, !dbg !86
  142. // CHECK:STDOUT: ret void, !dbg !86
  143. // CHECK:STDOUT: }
  144. // CHECK:STDOUT:
  145. // CHECK:STDOUT: ; Function Attrs: nounwind
  146. // CHECK:STDOUT: define linkonce_odr void @"_CSome.225258f1a45e9386:OptionalStorage.Core.5450dc8e8b8e0899"(ptr sret({ i32, i1 }) %return, i32 %self) #0 !dbg !87 {
  147. // CHECK:STDOUT: %value = getelementptr inbounds nuw { i32, i1 }, ptr %return, i32 0, i32 0, !dbg !90
  148. // CHECK:STDOUT: store i32 %self, ptr %value, align 4, !dbg !90
  149. // CHECK:STDOUT: %has_value = getelementptr inbounds nuw { i32, i1 }, ptr %return, i32 0, i32 1, !dbg !91
  150. // CHECK:STDOUT: store i8 1, ptr %has_value, align 1, !dbg !91
  151. // CHECK:STDOUT: ret void, !dbg !92
  152. // CHECK:STDOUT: }
  153. // CHECK:STDOUT:
  154. // CHECK:STDOUT: ; Function Attrs: nounwind
  155. // CHECK:STDOUT: define linkonce_odr void @"_CNone.225258f1a45e9386:OptionalStorage.Core.5450dc8e8b8e0899"(ptr sret({ i32, i1 }) %return) #0 !dbg !93 {
  156. // CHECK:STDOUT: %has_value = getelementptr inbounds nuw { i32, i1 }, ptr %return, i32 0, i32 1, !dbg !94
  157. // CHECK:STDOUT: store i8 0, ptr %has_value, align 1, !dbg !94
  158. // CHECK:STDOUT: ret void, !dbg !95
  159. // CHECK:STDOUT: }
  160. // CHECK:STDOUT:
  161. // CHECK:STDOUT: ; Function Attrs: nounwind
  162. // CHECK:STDOUT: define linkonce_odr i32 @"_CConvert.02bbc8f98b95ea6d:ImplicitAs.Core.5854fed63e66a74b"(i32 %self) #0 !dbg !96 {
  163. // CHECK:STDOUT: ret i32 %self, !dbg !102
  164. // CHECK:STDOUT: }
  165. // CHECK:STDOUT:
  166. // CHECK:STDOUT: ; uselistorder directives
  167. // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 2, 1, 0 }
  168. // CHECK:STDOUT:
  169. // CHECK:STDOUT: attributes #0 = { nounwind }
  170. // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
  171. // CHECK:STDOUT: attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
  172. // CHECK:STDOUT: attributes #3 = { alwaysinline nounwind }
  173. // CHECK:STDOUT:
  174. // CHECK:STDOUT: !llvm.module.flags = !{!0, !1}
  175. // CHECK:STDOUT: !llvm.dbg.cu = !{!2}
  176. // CHECK:STDOUT:
  177. // CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5}
  178. // CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3}
  179. // CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
  180. // CHECK:STDOUT: !3 = !DIFile(filename: "iterate.carbon", directory: "")
  181. // CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !2)
  182. // CHECK:STDOUT: !5 = !DISubroutineType(types: !6)
  183. // CHECK:STDOUT: !6 = !{null}
  184. // CHECK:STDOUT: !7 = !DILocation(line: 16, column: 26, scope: !4)
  185. // CHECK:STDOUT: !8 = !DILocation(line: 17, column: 7, scope: !4)
  186. // CHECK:STDOUT: !9 = !DILocation(line: 18, column: 5, scope: !4)
  187. // CHECK:STDOUT: !10 = !DILocation(line: 17, column: 3, scope: !4)
  188. // CHECK:STDOUT: !11 = !DILocation(line: 15, column: 1, scope: !4)
  189. // CHECK:STDOUT: !12 = distinct !DISubprogram(name: "NewCursor", linkageName: "_CNewCursor.f06e388f4a5bd5ec:Iterate.Core.a21f6adcc8abe06c", scope: null, file: !13, line: 23, type: !14, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18)
  190. // CHECK:STDOUT: !13 = !DIFile(filename: "{{.*}}/prelude/iterate.carbon", directory: "")
  191. // CHECK:STDOUT: !14 = !DISubroutineType(types: !15)
  192. // CHECK:STDOUT: !15 = !{!16, !17}
  193. // CHECK:STDOUT: !16 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
  194. // CHECK:STDOUT: !17 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 8)
  195. // CHECK:STDOUT: !18 = !{!19}
  196. // CHECK:STDOUT: !19 = !DILocalVariable(arg: 1, scope: !12, type: !17)
  197. // CHECK:STDOUT: !20 = !DILocation(line: 23, column: 39, scope: !12)
  198. // CHECK:STDOUT: !21 = distinct !DISubprogram(name: "Next", linkageName: "_CNext.f06e388f4a5bd5ec:Iterate.Core.a21f6adcc8abe06c", scope: null, file: !13, line: 24, type: !22, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !24)
  199. // CHECK:STDOUT: !22 = !DISubroutineType(types: !23)
  200. // CHECK:STDOUT: !23 = !{!17, !17, !17}
  201. // CHECK:STDOUT: !24 = !{!25, !26}
  202. // CHECK:STDOUT: !25 = !DILocalVariable(arg: 1, scope: !21, type: !17)
  203. // CHECK:STDOUT: !26 = !DILocalVariable(arg: 2, scope: !21, type: !17)
  204. // CHECK:STDOUT: !27 = !DILocation(line: 25, column: 9, scope: !21)
  205. // CHECK:STDOUT: !28 = !DILocation(line: 25, column: 8, scope: !21)
  206. // CHECK:STDOUT: !29 = !DILocation(line: 26, column: 7, scope: !21)
  207. // CHECK:STDOUT: !30 = !DILocation(line: 27, column: 36, scope: !21)
  208. // CHECK:STDOUT: !31 = !DILocation(line: 27, column: 31, scope: !21)
  209. // CHECK:STDOUT: !32 = !DILocation(line: 27, column: 14, scope: !21)
  210. // CHECK:STDOUT: !33 = !DILocation(line: 27, column: 7, scope: !21)
  211. // CHECK:STDOUT: !34 = !DILocation(line: 29, column: 14, scope: !21)
  212. // CHECK:STDOUT: !35 = !DILocation(line: 29, column: 7, scope: !21)
  213. // CHECK:STDOUT: !36 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.9a253b43086de47c", scope: null, file: !37, line: 32, type: !38, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !40)
  214. // CHECK:STDOUT: !37 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "")
  215. // CHECK:STDOUT: !38 = !DISubroutineType(types: !39)
  216. // CHECK:STDOUT: !39 = !{!17, !17}
  217. // CHECK:STDOUT: !40 = !{!41}
  218. // CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !36, type: !17)
  219. // CHECK:STDOUT: !42 = !DILocation(line: 33, column: 12, scope: !36)
  220. // CHECK:STDOUT: !43 = !DILocation(line: 33, column: 5, scope: !36)
  221. // CHECK:STDOUT: !44 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.9a253b43086de47c", scope: null, file: !37, line: 35, type: !14, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !45)
  222. // CHECK:STDOUT: !45 = !{!46}
  223. // CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !44, type: !17)
  224. // CHECK:STDOUT: !47 = !DILocation(line: 36, column: 12, scope: !44)
  225. // CHECK:STDOUT: !48 = !DILocation(line: 36, column: 5, scope: !44)
  226. // CHECK:STDOUT: !49 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !50, line: 339, type: !51, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !53)
  227. // CHECK:STDOUT: !50 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "")
  228. // CHECK:STDOUT: !51 = !DISubroutineType(types: !52)
  229. // CHECK:STDOUT: !52 = !{null, !16}
  230. // CHECK:STDOUT: !53 = !{!54}
  231. // CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !49, type: !16)
  232. // CHECK:STDOUT: !55 = !DILocation(line: 341, column: 5, scope: !49)
  233. // CHECK:STDOUT: !56 = !DILocation(line: 339, column: 3, scope: !49)
  234. // CHECK:STDOUT: !57 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.9a253b43086de47c", scope: null, file: !37, line: 29, type: !58, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !60)
  235. // CHECK:STDOUT: !58 = !DISubroutineType(types: !59)
  236. // CHECK:STDOUT: !59 = !{!17, !16}
  237. // CHECK:STDOUT: !60 = !{!61}
  238. // CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !57, type: !16)
  239. // CHECK:STDOUT: !62 = !DILocation(line: 30, column: 12, scope: !57)
  240. // CHECK:STDOUT: !63 = !DILocation(line: 30, column: 5, scope: !57)
  241. // CHECK:STDOUT: !64 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.9a253b43086de47c", scope: null, file: !37, line: 26, type: !65, spFlags: DISPFlagDefinition, unit: !2)
  242. // CHECK:STDOUT: !65 = !DISubroutineType(types: !66)
  243. // CHECK:STDOUT: !66 = !{!17}
  244. // CHECK:STDOUT: !67 = !DILocation(line: 27, column: 12, scope: !64)
  245. // CHECK:STDOUT: !68 = !DILocation(line: 27, column: 5, scope: !64)
  246. // CHECK:STDOUT: !69 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.225258f1a45e9386:OptionalStorage.Core.5450dc8e8b8e0899", scope: null, file: !37, line: 112, type: !38, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !70)
  247. // CHECK:STDOUT: !70 = !{!71}
  248. // CHECK:STDOUT: !71 = !DILocalVariable(arg: 1, scope: !69, type: !17)
  249. // CHECK:STDOUT: !72 = !DILocation(line: 113, column: 12, scope: !69)
  250. // CHECK:STDOUT: !73 = !DILocation(line: 113, column: 5, scope: !69)
  251. // CHECK:STDOUT: !74 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.225258f1a45e9386:OptionalStorage.Core.5450dc8e8b8e0899", scope: null, file: !37, line: 115, type: !14, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !75)
  252. // CHECK:STDOUT: !75 = !{!76}
  253. // CHECK:STDOUT: !76 = !DILocalVariable(arg: 1, scope: !74, type: !17)
  254. // CHECK:STDOUT: !77 = !DILocation(line: 116, column: 12, scope: !74)
  255. // CHECK:STDOUT: !78 = !DILocation(line: 116, column: 5, scope: !74)
  256. // CHECK:STDOUT: !79 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk.Int.Core:AddAssignWith.Core.dbc952efa35fc763", scope: null, file: !50, line: 275, type: !80, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !82)
  257. // CHECK:STDOUT: !80 = !DISubroutineType(types: !81)
  258. // CHECK:STDOUT: !81 = !{null, !16, !16}
  259. // CHECK:STDOUT: !82 = !{!83, !84}
  260. // CHECK:STDOUT: !83 = !DILocalVariable(arg: 1, scope: !79, type: !16)
  261. // CHECK:STDOUT: !84 = !DILocalVariable(arg: 2, scope: !79, type: !16)
  262. // CHECK:STDOUT: !85 = !DILocation(line: 4294967295, scope: !79)
  263. // CHECK:STDOUT: !86 = !DILocation(line: 275, column: 3, scope: !79)
  264. // CHECK:STDOUT: !87 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.225258f1a45e9386:OptionalStorage.Core.5450dc8e8b8e0899", scope: null, file: !37, line: 104, type: !58, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !88)
  265. // CHECK:STDOUT: !88 = !{!89}
  266. // CHECK:STDOUT: !89 = !DILocalVariable(arg: 1, scope: !87, type: !16)
  267. // CHECK:STDOUT: !90 = !DILocation(line: 108, column: 5, scope: !87)
  268. // CHECK:STDOUT: !91 = !DILocation(line: 109, column: 5, scope: !87)
  269. // CHECK:STDOUT: !92 = !DILocation(line: 110, column: 5, scope: !87)
  270. // CHECK:STDOUT: !93 = distinct !DISubprogram(name: "None", linkageName: "_CNone.225258f1a45e9386:OptionalStorage.Core.5450dc8e8b8e0899", scope: null, file: !37, line: 99, type: !65, spFlags: DISPFlagDefinition, unit: !2)
  271. // CHECK:STDOUT: !94 = !DILocation(line: 101, column: 5, scope: !93)
  272. // CHECK:STDOUT: !95 = !DILocation(line: 102, column: 5, scope: !93)
  273. // CHECK:STDOUT: !96 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.02bbc8f98b95ea6d:ImplicitAs.Core.5854fed63e66a74b", scope: null, file: !97, line: 24, type: !98, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !100)
  274. // CHECK:STDOUT: !97 = !DIFile(filename: "{{.*}}/prelude/operators/as.carbon", directory: "")
  275. // CHECK:STDOUT: !98 = !DISubroutineType(types: !99)
  276. // CHECK:STDOUT: !99 = !{!16, !16}
  277. // CHECK:STDOUT: !100 = !{!101}
  278. // CHECK:STDOUT: !101 = !DILocalVariable(arg: 1, scope: !96, type: !16)
  279. // CHECK:STDOUT: !102 = !DILocation(line: 24, column: 38, scope: !96)