Update LLVM to c744694c6ae1 (#8096)

Moves Carbon code away from deprecated `llvm::IRBuilder`
and `llvm::PassBuilder` constructors  

Removes llvm patch 0002 as it landed upstream in
[#234482](https://github.com/llvm/llvm-project/pull/234482)

Removes llvm patch 0004 as it landed upstream in
[#234485](https://github.com/llvm/llvm-project/pull/234485)

Removes llvm patch 0005 as it landed upstream in
[#234489](https://github.com/llvm/llvm-project/pull/234489)

Removes llvm patch 0006 as it landed upstream in
[#234486](https://github.com/llvm/llvm-project/pull/234486)

Adds llvm patch 0013, also uploaded as an upstream
PR in [#239321](https://github.com/llvm/llvm-project/pull/239321)

Updates tests in lower and driver to suit changes to LLVM.
This commit is contained in:
Lucile Rose Nihlen authored and GitHub committed 2026-11-05 20:33:12 +00:00
1 parent 3741e72c8a
commit a567040d77
64 files changed
+4351 -4567

No files matched your search

@@ -105,8 +105,8 @@ void f() {
// CHECK:STDOUT: attributes #6 = { nounwind }
// CHECK:STDOUT:
// CHECK:STDOUT: !llvm.dbg.cu = !{!6}
// CHECK:STDOUT: !llvm.module.flags = !{!39, !40, !41, !3, !4}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!43}
// CHECK:STDOUT: !llvm.module.flags = !{!39, !40, !41, !42, !3, !4}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!44}
// CHECK:STDOUT:
// CHECK:STDOUT: !3 = !{i32 7, !"Dwarf Version", i32 5}
// CHECK:STDOUT: !4 = !{i32 2, !"Debug Info Version", i32 3}
@@ -139,9 +139,10 @@ void f() {
// CHECK:STDOUT: !36 = !{!35, !35, i64 0}
// CHECK:STDOUT: !37 = !{!"int", !33, i64 0}
// CHECK:STDOUT: !38 = !{!37, !37, i64 0}
// CHECK:STDOUT: !39 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !40 = !{i32 7, !"PIE Level", i32 2}
// CHECK:STDOUT: !41 = !{i32 7, !"uwtable", i32 2}
// CHECK:STDOUT: !42 = !{!"__libc_errno", !37, i64 0}
// CHECK:STDOUT: !43 = !{!42, !37, i64 0}
// CHECK:STDOUT: !39 = !{i32 2, !"debugger-tuning", !"gdb"}
// CHECK:STDOUT: !40 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !41 = !{i32 7, !"PIE Level", i32 2}
// CHECK:STDOUT: !42 = !{i32 7, !"uwtable", i32 2}
// CHECK:STDOUT: !43 = !{!"__libc_errno", !37, i64 0}
// CHECK:STDOUT: !44 = !{!43, !37, i64 0}
// CHECK:STDOUT:
@@ -156,8 +156,8 @@ void CallF() {
// CHECK:STDOUT: attributes #3 = { nounwind }
// CHECK:STDOUT:
// CHECK:STDOUT: !llvm.dbg.cu = !{!40}
// CHECK:STDOUT: !llvm.module.flags = !{!53, !54, !55, !6, !7}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!57}
// CHECK:STDOUT: !llvm.module.flags = !{!53, !54, !55, !56, !6, !7}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!58}
// CHECK:STDOUT:
// CHECK:STDOUT: !0 = !{!"Simple C++ TBAA"}
// CHECK:STDOUT: !1 = !{!"omnipotent char", !0, i64 0}
@@ -184,9 +184,10 @@ void CallF() {
// CHECK:STDOUT: !50 = !DISubroutineType(types: !49)
// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !39, type: !50, spFlags: DISPFlagDefinition, unit: !40)
// CHECK:STDOUT: !52 = !DILocation(line: 0, scope: !51)
// CHECK:STDOUT: !53 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !54 = !{i32 7, !"PIE Level", i32 2}
// CHECK:STDOUT: !55 = !{i32 7, !"uwtable", i32 2}
// CHECK:STDOUT: !56 = !{!"__libc_errno", !2, i64 0}
// CHECK:STDOUT: !57 = !{!56, !2, i64 0}
// CHECK:STDOUT: !53 = !{i32 2, !"debugger-tuning", !"gdb"}
// CHECK:STDOUT: !54 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !55 = !{i32 7, !"PIE Level", i32 2}
// CHECK:STDOUT: !56 = !{i32 7, !"uwtable", i32 2}
// CHECK:STDOUT: !57 = !{!"__libc_errno", !2, i64 0}
// CHECK:STDOUT: !58 = !{!57, !2, i64 0}
// CHECK:STDOUT:
@@ -264,8 +264,8 @@ fn CallCallBase() { Cpp.CallBase(); }
// CHECK:STDOUT: attributes #2 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
// CHECK:STDOUT:
// CHECK:STDOUT: !llvm.dbg.cu = !{!41}
// CHECK:STDOUT: !llvm.module.flags = !{!68, !69, !70, !2, !3}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!72}
// CHECK:STDOUT: !llvm.module.flags = !{!68, !69, !70, !71, !2, !3}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!73}
// CHECK:STDOUT:
// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5}
// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3}
@@ -306,11 +306,12 @@ fn CallCallBase() { Cpp.CallBase(); }
// CHECK:STDOUT: !65 = !{!64, !64, i64 0}
// CHECK:STDOUT: !66 = !{!"float", !61, i64 0}
// CHECK:STDOUT: !67 = !{!66, !66, i64 0}
// CHECK:STDOUT: !68 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !69 = !{i32 7, !"PIE Level", i32 2}
// CHECK:STDOUT: !70 = !{i32 7, !"uwtable", i32 2}
// CHECK:STDOUT: !71 = !{!"__libc_errno", !64, i64 0}
// CHECK:STDOUT: !72 = !{!71, !64, i64 0}
// CHECK:STDOUT: !68 = !{i32 2, !"debugger-tuning", !"gdb"}
// CHECK:STDOUT: !69 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !70 = !{i32 7, !"PIE Level", i32 2}
// CHECK:STDOUT: !71 = !{i32 7, !"uwtable", i32 2}
// CHECK:STDOUT: !72 = !{!"__libc_errno", !64, i64 0}
// CHECK:STDOUT: !73 = !{!72, !64, i64 0}
// CHECK:STDOUT:
// CHECK:STDOUT: ; ---
// CHECK:STDOUT: ; ModuleID = 'single_file.carbon'
@@ -323,23 +324,23 @@ fn CallCallBase() { Cpp.CallBase(); }
// CHECK:STDOUT: $_Z2G1v = comdat any
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !75 {
// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !76 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret void, !dbg !76
// CHECK:STDOUT: ret void, !dbg !77
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define linkonce_odr void @_CF__carbon_thunk.Main() #1 !dbg !77 {
// CHECK:STDOUT: define linkonce_odr void @_CF__carbon_thunk.Main() #1 !dbg !78 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: call void @_CF.Main(), !dbg !78
// CHECK:STDOUT: ret void, !dbg !78
// CHECK:STDOUT: call void @_CF.Main(), !dbg !79
// CHECK:STDOUT: ret void, !dbg !79
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define void @_CH.Main() #0 !dbg !79 {
// CHECK:STDOUT: define void @_CH.Main() #0 !dbg !80 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: call void @_Z2G2v(), !dbg !80
// CHECK:STDOUT: ret void, !dbg !81
// CHECK:STDOUT: call void @_Z2G2v(), !dbg !81
// CHECK:STDOUT: ret void, !dbg !82
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: inlinehint mustprogress uwtable
@@ -368,9 +369,9 @@ fn CallCallBase() { Cpp.CallBase(); }
// CHECK:STDOUT: attributes #2 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
// CHECK:STDOUT: attributes #3 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
// CHECK:STDOUT:
// CHECK:STDOUT: !llvm.dbg.cu = !{!74}
// CHECK:STDOUT: !llvm.module.flags = !{!68, !69, !70, !2, !3}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!72}
// CHECK:STDOUT: !llvm.dbg.cu = !{!75}
// CHECK:STDOUT: !llvm.module.flags = !{!68, !69, !70, !71, !2, !3}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!73}
// CHECK:STDOUT:
// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5}
// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3}
@@ -379,20 +380,21 @@ fn CallCallBase() { Cpp.CallBase(); }
// CHECK:STDOUT: !60 = !{!"Simple C++ TBAA"}
// CHECK:STDOUT: !61 = !{!"omnipotent char", !60, i64 0}
// CHECK:STDOUT: !64 = !{!"int", !61, i64 0}
// CHECK:STDOUT: !68 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !69 = !{i32 7, !"PIE Level", i32 2}
// CHECK:STDOUT: !70 = !{i32 7, !"uwtable", i32 2}
// CHECK:STDOUT: !71 = !{!"__libc_errno", !64, i64 0}
// CHECK:STDOUT: !72 = !{!71, !64, i64 0}
// CHECK:STDOUT: !73 = !DIFile(filename: "single_file.carbon", directory: "")
// CHECK:STDOUT: !74 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !73, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !73, line: 6, type: !8, spFlags: DISPFlagDefinition, unit: !74)
// CHECK:STDOUT: !76 = !DILocation(line: 6, column: 1, scope: !75)
// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "F__carbon_thunk", linkageName: "_CF__carbon_thunk.Main", scope: null, file: !73, line: 6, type: !8, spFlags: DISPFlagDefinition, unit: !74)
// CHECK:STDOUT: !78 = !DILocation(line: 6, column: 1, scope: !77)
// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main", scope: null, file: !73, line: 20, type: !8, spFlags: DISPFlagDefinition, unit: !74)
// CHECK:STDOUT: !80 = !DILocation(line: 20, column: 10, scope: !79)
// CHECK:STDOUT: !81 = !DILocation(line: 20, column: 1, scope: !79)
// CHECK:STDOUT: !68 = !{i32 2, !"debugger-tuning", !"gdb"}
// CHECK:STDOUT: !69 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !70 = !{i32 7, !"PIE Level", i32 2}
// CHECK:STDOUT: !71 = !{i32 7, !"uwtable", i32 2}
// CHECK:STDOUT: !72 = !{!"__libc_errno", !64, i64 0}
// CHECK:STDOUT: !73 = !{!72, !64, i64 0}
// CHECK:STDOUT: !74 = !DIFile(filename: "single_file.carbon", directory: "")
// CHECK:STDOUT: !75 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !74, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !74, line: 6, type: !8, spFlags: DISPFlagDefinition, unit: !75)
// CHECK:STDOUT: !77 = !DILocation(line: 6, column: 1, scope: !76)
// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "F__carbon_thunk", linkageName: "_CF__carbon_thunk.Main", scope: null, file: !74, line: 6, type: !8, spFlags: DISPFlagDefinition, unit: !75)
// CHECK:STDOUT: !79 = !DILocation(line: 6, column: 1, scope: !78)
// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main", scope: null, file: !74, line: 20, type: !8, spFlags: DISPFlagDefinition, unit: !75)
// CHECK:STDOUT: !81 = !DILocation(line: 20, column: 10, scope: !80)
// CHECK:STDOUT: !82 = !DILocation(line: 20, column: 1, scope: !80)
// CHECK:STDOUT:
// CHECK:STDOUT: ; ---
// CHECK:STDOUT: ; ModuleID = 'keyword_name.carbon'
@@ -403,23 +405,23 @@ fn CallCallBase() { Cpp.CallBase(); }
// CHECK:STDOUT: $_Z8CallBasev = comdat any
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define void @_Cbase.Main() #0 !dbg !84 {
// CHECK:STDOUT: define void @_Cbase.Main() #0 !dbg !85 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret void, !dbg !85
// CHECK:STDOUT: ret void, !dbg !86
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define linkonce_odr void @_Cbase__carbon_thunk.Main() #1 !dbg !86 {
// CHECK:STDOUT: define linkonce_odr void @_Cbase__carbon_thunk.Main() #1 !dbg !87 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: call void @_Cbase.Main(), !dbg !87
// CHECK:STDOUT: ret void, !dbg !87
// CHECK:STDOUT: call void @_Cbase.Main(), !dbg !88
// CHECK:STDOUT: ret void, !dbg !88
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define void @_CCallCallBase.Main() #0 !dbg !88 {
// CHECK:STDOUT: define void @_CCallCallBase.Main() #0 !dbg !89 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: call void @_Z8CallBasev(), !dbg !89
// CHECK:STDOUT: ret void, !dbg !90
// CHECK:STDOUT: call void @_Z8CallBasev(), !dbg !90
// CHECK:STDOUT: ret void, !dbg !91
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: inlinehint mustprogress uwtable
@@ -441,9 +443,9 @@ fn CallCallBase() { Cpp.CallBase(); }
// CHECK:STDOUT: attributes #2 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
// CHECK:STDOUT: attributes #3 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
// CHECK:STDOUT:
// CHECK:STDOUT: !llvm.dbg.cu = !{!83}
// CHECK:STDOUT: !llvm.module.flags = !{!68, !69, !70, !2, !3}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!72}
// CHECK:STDOUT: !llvm.dbg.cu = !{!84}
// CHECK:STDOUT: !llvm.module.flags = !{!68, !69, !70, !71, !2, !3}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!73}
// CHECK:STDOUT:
// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5}
// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3}
@@ -452,18 +454,19 @@ fn CallCallBase() { Cpp.CallBase(); }
// CHECK:STDOUT: !60 = !{!"Simple C++ TBAA"}
// CHECK:STDOUT: !61 = !{!"omnipotent char", !60, i64 0}
// CHECK:STDOUT: !64 = !{!"int", !61, i64 0}
// CHECK:STDOUT: !68 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !69 = !{i32 7, !"PIE Level", i32 2}
// CHECK:STDOUT: !70 = !{i32 7, !"uwtable", i32 2}
// CHECK:STDOUT: !71 = !{!"__libc_errno", !64, i64 0}
// CHECK:STDOUT: !72 = !{!71, !64, i64 0}
// CHECK:STDOUT: !82 = !DIFile(filename: "keyword_name.carbon", directory: "")
// CHECK:STDOUT: !83 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !82, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
// CHECK:STDOUT: !84 = distinct !DISubprogram(name: "base", linkageName: "_Cbase.Main", scope: null, file: !82, line: 6, type: !8, spFlags: DISPFlagDefinition, unit: !83)
// CHECK:STDOUT: !85 = !DILocation(line: 6, column: 1, scope: !84)
// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "base__carbon_thunk", linkageName: "_Cbase__carbon_thunk.Main", scope: null, file: !82, line: 6, type: !8, spFlags: DISPFlagDefinition, unit: !83)
// CHECK:STDOUT: !87 = !DILocation(line: 6, column: 1, scope: !86)
// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "CallCallBase", linkageName: "_CCallCallBase.Main", scope: null, file: !82, line: 14, type: !8, spFlags: DISPFlagDefinition, unit: !83)
// CHECK:STDOUT: !89 = !DILocation(line: 14, column: 21, scope: !88)
// CHECK:STDOUT: !90 = !DILocation(line: 14, column: 1, scope: !88)
// CHECK:STDOUT: !68 = !{i32 2, !"debugger-tuning", !"gdb"}
// CHECK:STDOUT: !69 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !70 = !{i32 7, !"PIE Level", i32 2}
// CHECK:STDOUT: !71 = !{i32 7, !"uwtable", i32 2}
// CHECK:STDOUT: !72 = !{!"__libc_errno", !64, i64 0}
// CHECK:STDOUT: !73 = !{!72, !64, i64 0}
// CHECK:STDOUT: !83 = !DIFile(filename: "keyword_name.carbon", directory: "")
// CHECK:STDOUT: !84 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !83, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "base", linkageName: "_Cbase.Main", scope: null, file: !83, line: 6, type: !8, spFlags: DISPFlagDefinition, unit: !84)
// CHECK:STDOUT: !86 = !DILocation(line: 6, column: 1, scope: !85)
// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "base__carbon_thunk", linkageName: "_Cbase__carbon_thunk.Main", scope: null, file: !83, line: 6, type: !8, spFlags: DISPFlagDefinition, unit: !84)
// CHECK:STDOUT: !88 = !DILocation(line: 6, column: 1, scope: !87)
// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "CallCallBase", linkageName: "_CCallCallBase.Main", scope: null, file: !83, line: 14, type: !8, spFlags: DISPFlagDefinition, unit: !84)
// CHECK:STDOUT: !90 = !DILocation(line: 14, column: 21, scope: !89)
// CHECK:STDOUT: !91 = !DILocation(line: 14, column: 1, scope: !89)
// CHECK:STDOUT:
@@ -255,8 +255,8 @@ fn Run() {
// CHECK:STDOUT: attributes #6 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
// CHECK:STDOUT:
// CHECK:STDOUT: !llvm.dbg.cu = !{!15}
// CHECK:STDOUT: !llvm.module.flags = !{!86, !87, !88, !4, !5}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!91}
// CHECK:STDOUT: !llvm.module.flags = !{!86, !87, !88, !89, !4, !5}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!92}
// CHECK:STDOUT:
// CHECK:STDOUT: !4 = !{i32 7, !"Dwarf Version", i32 5}
// CHECK:STDOUT: !5 = !{i32 2, !"Debug Info Version", i32 3}
@@ -321,10 +321,11 @@ fn Run() {
// CHECK:STDOUT: !83 = !{!82, !82, i64 0}
// CHECK:STDOUT: !84 = !{!"p1 _ZTSN6Carbon4Main1BE", !81, i64 0}
// CHECK:STDOUT: !85 = !{!84, !84, i64 0}
// CHECK:STDOUT: !86 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !87 = !{i32 7, !"PIE Level", i32 2}
// CHECK:STDOUT: !88 = !{i32 7, !"uwtable", i32 2}
// CHECK:STDOUT: !89 = !{!"int", !80, i64 0}
// CHECK:STDOUT: !90 = !{!"__libc_errno", !89, i64 0}
// CHECK:STDOUT: !91 = !{!90, !89, i64 0}
// CHECK:STDOUT: !86 = !{i32 2, !"debugger-tuning", !"gdb"}
// CHECK:STDOUT: !87 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !88 = !{i32 7, !"PIE Level", i32 2}
// CHECK:STDOUT: !89 = !{i32 7, !"uwtable", i32 2}
// CHECK:STDOUT: !90 = !{!"int", !80, i64 0}
// CHECK:STDOUT: !91 = !{!"__libc_errno", !90, i64 0}
// CHECK:STDOUT: !92 = !{!91, !90, i64 0}
// CHECK:STDOUT:
@@ -105,8 +105,8 @@ fn H() -> i32 { return Cpp.G(); }
// CHECK:STDOUT: attributes #3 = { nounwind "frame-pointer"="non-leaf-no-reserve" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+altnzcv,+ccdp,+ccidx,+ccpp,+complxnum,+crc,+dit,+dotprod,+flagm,+fp-armv8,+fp16fml,+fptoint,+fullfp16,+jsconv,+lse,+neon,+pauth,+perfmon,+predres,+ras,+rcpc,+rdm,+sb,+sha2,+sha3,+specrestrict,+ssbs,+v8.1a,+v8.2a,+v8.3a,+v8.4a,+v8a" "tune-cpu"="apple-m5" }
// CHECK:STDOUT:
// CHECK:STDOUT: !llvm.dbg.cu = !{!10}
// CHECK:STDOUT: !llvm.module.flags = !{!37, !38, !39, !7, !8}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!41}
// CHECK:STDOUT: !llvm.module.flags = !{!37, !38, !39, !40, !7, !8}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!42}
// CHECK:STDOUT:
// CHECK:STDOUT: !0 = !{!"Simple C++ TBAA"}
// CHECK:STDOUT: !1 = !{!"omnipotent char", !0, i64 0}
@@ -135,11 +135,12 @@ fn H() -> i32 { return Cpp.G(); }
// CHECK:STDOUT: !34 = !DILocation(line: 14, column: 24, scope: !31)
// CHECK:STDOUT: !35 = !DILocation(line: 14, column: 17, scope: !31)
// CHECK:STDOUT: !36 = !{!2, !2, i64 0}
// CHECK:STDOUT: !37 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !38 = !{i32 7, !"uwtable", i32 1}
// CHECK:STDOUT: !39 = !{i32 7, !"frame-pointer", i32 4}
// CHECK:STDOUT: !40 = !{!"__libc_errno", !2, i64 0}
// CHECK:STDOUT: !41 = !{!40, !2, i64 0}
// CHECK:STDOUT: !37 = !{i32 2, !"debugger-tuning", !"lldb"}
// CHECK:STDOUT: !38 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !39 = !{i32 7, !"uwtable", i32 1}
// CHECK:STDOUT: !40 = !{i32 7, !"frame-pointer", i32 4}
// CHECK:STDOUT: !41 = !{!"__libc_errno", !2, i64 0}
// CHECK:STDOUT: !42 = !{!41, !2, i64 0}
// CHECK:STDOUT:
// CHECK:STDOUT: ; ---
// CHECK:STDOUT: ; ModuleID = 'constructor.carbon'
@@ -170,7 +171,7 @@ fn H() -> i32 { return Cpp.G(); }
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %this.addr = alloca ptr, align 8
// CHECK:STDOUT: %.addr = alloca i32, align 4
// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !101
// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !102
// CHECK:STDOUT: store i32 %0, ptr %.addr, align 4, !tbaa !36
// CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8
// CHECK:STDOUT: %call = call noundef ptr @"\01__CC__carbon_thunk.C.Main"(ptr noundef nonnull align 4 dereferenceable(4) %this1, ptr noundef nonnull align 4 dereferenceable(4) %.addr)
@@ -181,7 +182,7 @@ fn H() -> i32 { return Cpp.G(); }
// CHECK:STDOUT: define linkonce_odr noundef ptr @_ZN6Carbon4Main1CD1Ev(ptr noundef nonnull returned align 4 dead_on_return(4) dereferenceable(4) %this) unnamed_addr #3 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %this.addr = alloca ptr, align 8
// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !101
// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !102
// CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8
// CHECK:STDOUT: %call = call noundef ptr @_ZN6Carbon4Main1CD2Ev(ptr noundef nonnull align 4 dead_on_return(4) dereferenceable(4) %this1) #4
// CHECK:STDOUT: ret ptr %this1
@@ -191,67 +192,67 @@ fn H() -> i32 { return Cpp.G(); }
// CHECK:STDOUT: declare void @llvm.lifetime.end.p0(ptr captures(none)) #1
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define void @_CC.C.Main(ptr sret({ i32 }) %return, i32 %i) #4 !dbg !51 {
// CHECK:STDOUT: define void @_CC.C.Main(ptr sret({ i32 }) %return, i32 %i) #4 !dbg !52 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %.loc8_19.2.i = getelementptr inbounds nuw { i32 }, ptr %return, i32 0, i32 0, !dbg !57
// CHECK:STDOUT: store i32 %i, ptr %.loc8_19.2.i, align 4, !dbg !57
// CHECK:STDOUT: ret void, !dbg !58
// CHECK:STDOUT: %.loc8_19.2.i = getelementptr inbounds nuw { i32 }, ptr %return, i32 0, i32 0, !dbg !58
// CHECK:STDOUT: store i32 %i, ptr %.loc8_19.2.i, align 4, !dbg !58
// CHECK:STDOUT: ret void, !dbg !59
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind
// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.C.Main"(ptr %self) #5 !dbg !60 {
// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.C.Main"(ptr %self) #5 !dbg !61 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: call void @_CSelfDestruct.Core.356af3b6aef18564(ptr %self), !dbg !62
// CHECK:STDOUT: ret void, !dbg !62
// CHECK:STDOUT: call void @_CSelfDestruct.Core.356af3b6aef18564(ptr %self), !dbg !63
// CHECK:STDOUT: ret void, !dbg !63
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_COp.d424893893628d5b:core.SubobjectDestroy.Core"(ptr %self) #4 !dbg !64 {
// CHECK:STDOUT: define weak_odr void @"_COp.d424893893628d5b:core.SubobjectDestroy.Core"(ptr %self) #4 !dbg !65 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %.loc6_9.1.i = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !66
// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc6_9.1.i), !dbg !66
// CHECK:STDOUT: ret void, !dbg !66
// CHECK:STDOUT: %.loc6_9.1.i = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !67
// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc6_9.1.i), !dbg !67
// CHECK:STDOUT: ret void, !dbg !67
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_COp.08d9e38b928ba575:core.SubobjectDestroy.Core"(ptr %self) #4 !dbg !70 {
// CHECK:STDOUT: define weak_odr void @"_COp.08d9e38b928ba575:core.SubobjectDestroy.Core"(ptr %self) #4 !dbg !71 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %.loc6_9.1.i = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !72
// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc6_9.1.i), !dbg !72
// CHECK:STDOUT: ret void, !dbg !72
// CHECK:STDOUT: %.loc6_9.1.i = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !73
// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc6_9.1.i), !dbg !73
// CHECK:STDOUT: ret void, !dbg !73
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define linkonce_odr noundef ptr @"\01__CC__carbon_thunk.C.Main"(ptr noundef nonnull returned align 4 dereferenceable(4) %_, ptr noundef nonnull align 4 dereferenceable(4) %_1) unnamed_addr #6 !dbg !74 {
// CHECK:STDOUT: define linkonce_odr noundef ptr @"\01__CC__carbon_thunk.C.Main"(ptr noundef nonnull returned align 4 dereferenceable(4) %_, ptr noundef nonnull align 4 dereferenceable(4) %_1) unnamed_addr #6 !dbg !75 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %.loc7_24.2 = load i32, ptr %_1, align 4, !dbg !77
// CHECK:STDOUT: call void @_CC.C.Main(ptr %_, i32 %.loc7_24.2), !dbg !77
// CHECK:STDOUT: %.loc7_24.2 = load i32, ptr %_1, align 4, !dbg !78
// CHECK:STDOUT: call void @_CC.C.Main(ptr %_, i32 %.loc7_24.2), !dbg !78
// CHECK:STDOUT: ret ptr %_
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define i32 @_CH.Main() #4 !dbg !79 {
// CHECK:STDOUT: define i32 @_CH.Main() #4 !dbg !80 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %G.call = call i32 @_Z1Gv(), !dbg !82
// CHECK:STDOUT: ret i32 %G.call, !dbg !83
// CHECK:STDOUT: %G.call = call i32 @_Z1Gv(), !dbg !83
// CHECK:STDOUT: ret i32 %G.call, !dbg !84
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.356af3b6aef18564(ptr %t) #4 !dbg !85 {
// CHECK:STDOUT: call void @"_COp.08d9e38b928ba575:core.SubobjectDestroy.Core"(ptr %t), !dbg !89
// CHECK:STDOUT: ret void, !dbg !90
// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.356af3b6aef18564(ptr %t) #4 !dbg !86 {
// CHECK:STDOUT: call void @"_COp.08d9e38b928ba575:core.SubobjectDestroy.Core"(ptr %t), !dbg !90
// CHECK:STDOUT: ret void, !dbg !91
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #4 !dbg !92 {
// CHECK:STDOUT: ret void, !dbg !97
// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #4 !dbg !93 {
// CHECK:STDOUT: ret void, !dbg !98
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: inlinehint mustprogress nounwind ssp uwtable(sync)
// CHECK:STDOUT: define linkonce_odr noundef ptr @_ZN6Carbon4Main1CD2Ev(ptr noundef nonnull returned align 4 dead_on_return(4) dereferenceable(4) %this) unnamed_addr #3 personality ptr @__gxx_personality_v0 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %this.addr = alloca ptr, align 8
// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !101
// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !102
// CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8
// CHECK:STDOUT: invoke void @"\01__C__destroy_thunk:thunk.C.Main"(ptr noundef nonnull align 4 dereferenceable(4) %this1)
// CHECK:STDOUT: to label %invoke.cont unwind label %terminate.lpad
@@ -296,9 +297,9 @@ fn H() -> i32 { return Cpp.G(); }
// CHECK:STDOUT: attributes #8 = { noinline noreturn nounwind ssp uwtable(sync) "frame-pointer"="non-leaf-no-reserve" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+altnzcv,+ccdp,+ccidx,+ccpp,+complxnum,+crc,+dit,+dotprod,+flagm,+fp-armv8,+fp16fml,+fptoint,+fullfp16,+jsconv,+lse,+neon,+pauth,+perfmon,+predres,+ras,+rcpc,+rdm,+sb,+sha2,+sha3,+specrestrict,+ssbs,+v8.1a,+v8.2a,+v8.3a,+v8.4a,+v8a" "tune-cpu"="apple-m5" }
// CHECK:STDOUT: attributes #9 = { noreturn nounwind }
// CHECK:STDOUT:
// CHECK:STDOUT: !llvm.dbg.cu = !{!43}
// CHECK:STDOUT: !llvm.module.flags = !{!37, !38, !39, !7, !8}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!41}
// CHECK:STDOUT: !llvm.dbg.cu = !{!44}
// CHECK:STDOUT: !llvm.module.flags = !{!37, !38, !39, !40, !7, !8}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!42}
// CHECK:STDOUT:
// CHECK:STDOUT: !0 = !{!"Simple C++ TBAA"}
// CHECK:STDOUT: !1 = !{!"omnipotent char", !0, i64 0}
@@ -311,58 +312,59 @@ fn H() -> i32 { return Cpp.G(); }
// CHECK:STDOUT: !16 = !{!11}
// CHECK:STDOUT: !17 = !DISubroutineType(types: !16)
// CHECK:STDOUT: !36 = !{!2, !2, i64 0}
// CHECK:STDOUT: !37 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !38 = !{i32 7, !"uwtable", i32 1}
// CHECK:STDOUT: !39 = !{i32 7, !"frame-pointer", i32 4}
// CHECK:STDOUT: !40 = !{!"__libc_errno", !2, i64 0}
// CHECK:STDOUT: !41 = !{!40, !2, i64 0}
// CHECK:STDOUT: !42 = !DIFile(filename: "constructor.carbon", directory: "")
// CHECK:STDOUT: !43 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !42, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
// CHECK:STDOUT: !44 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64)
// CHECK:STDOUT: !45 = !{!44, !11}
// CHECK:STDOUT: !46 = !DISubroutineType(types: !45)
// CHECK:STDOUT: !47 = !{null, !44}
// CHECK:STDOUT: !48 = !DISubroutineType(types: !47)
// CHECK:STDOUT: !49 = !{null, !44, !11}
// CHECK:STDOUT: !50 = !DISubroutineType(types: !49)
// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "C", linkageName: "_CC.C.Main", scope: null, file: !42, line: 7, type: !46, spFlags: DISPFlagDefinition, unit: !43, retainedNodes: !59)
// CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !11)
// CHECK:STDOUT: !57 = !DILocation(line: 8, column: 12, scope: !51)
// CHECK:STDOUT: !58 = !DILocation(line: 8, column: 5, scope: !51)
// CHECK:STDOUT: !59 = !{!52}
// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.C.Main", scope: null, file: !42, line: 6, type: !48, spFlags: DISPFlagDefinition, unit: !43, retainedNodes: !63)
// CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !44)
// CHECK:STDOUT: !62 = !DILocation(line: 6, column: 1, scope: !60)
// CHECK:STDOUT: !63 = !{!61}
// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "Op", linkageName: "_COp.d424893893628d5b:core.SubobjectDestroy.Core", scope: null, file: !42, line: 6, type: !48, spFlags: DISPFlagDefinition, unit: !43, retainedNodes: !69)
// CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !44)
// CHECK:STDOUT: !66 = !DILocation(line: 6, column: 1, scope: !64)
// CHECK:STDOUT: !67 = !{null, !11}
// CHECK:STDOUT: !68 = !DISubroutineType(types: !67)
// CHECK:STDOUT: !69 = !{!65}
// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "Op", linkageName: "_COp.08d9e38b928ba575:core.SubobjectDestroy.Core", scope: null, file: !42, line: 6, type: !48, spFlags: DISPFlagDefinition, unit: !43, retainedNodes: !73)
// CHECK:STDOUT: !71 = !DILocalVariable(arg: 1, scope: !70, type: !44)
// CHECK:STDOUT: !72 = !DILocation(line: 6, column: 1, scope: !70)
// CHECK:STDOUT: !73 = !{!71}
// CHECK:STDOUT: !74 = distinct !DISubprogram(name: "C__carbon_thunk", linkageName: "_CC__carbon_thunk.C.Main", scope: null, file: !42, line: 7, type: !50, spFlags: DISPFlagDefinition, unit: !43, retainedNodes: !78)
// CHECK:STDOUT: !75 = !DILocalVariable(arg: 1, scope: !74, type: !44)
// CHECK:STDOUT: !76 = !DILocalVariable(arg: 2, scope: !74, type: !11)
// CHECK:STDOUT: !77 = !DILocation(line: 7, column: 3, scope: !74)
// CHECK:STDOUT: !78 = !{!75, !76}
// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main", scope: null, file: !42, line: 21, type: !17, spFlags: DISPFlagDefinition, unit: !43)
// CHECK:STDOUT: !82 = !DILocation(line: 21, column: 24, scope: !79)
// CHECK:STDOUT: !83 = !DILocation(line: 21, column: 17, scope: !79)
// CHECK:STDOUT: !84 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "")
// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.356af3b6aef18564", scope: null, file: !84, line: 36, type: !48, spFlags: DISPFlagDefinition, unit: !43, retainedNodes: !91)
// CHECK:STDOUT: !86 = !DILocalVariable(arg: 1, scope: !85, type: !44)
// CHECK:STDOUT: !89 = !DILocation(line: 38, column: 5, scope: !85)
// CHECK:STDOUT: !90 = !DILocation(line: 36, column: 1, scope: !85)
// CHECK:STDOUT: !91 = !{!86}
// CHECK:STDOUT: !92 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !84, line: 36, type: !68, spFlags: DISPFlagDefinition, unit: !43, retainedNodes: !98)
// CHECK:STDOUT: !93 = !DILocalVariable(arg: 1, scope: !92, type: !11)
// CHECK:STDOUT: !97 = !DILocation(line: 36, column: 1, scope: !92)
// CHECK:STDOUT: !98 = !{!93}
// CHECK:STDOUT: !99 = !{!"any pointer", !1, i64 0}
// CHECK:STDOUT: !100 = !{!"p1 _ZTSN6Carbon4Main1CE", !99, i64 0}
// CHECK:STDOUT: !101 = !{!100, !100, i64 0}
// CHECK:STDOUT: !37 = !{i32 2, !"debugger-tuning", !"lldb"}
// CHECK:STDOUT: !38 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !39 = !{i32 7, !"uwtable", i32 1}
// CHECK:STDOUT: !40 = !{i32 7, !"frame-pointer", i32 4}
// CHECK:STDOUT: !41 = !{!"__libc_errno", !2, i64 0}
// CHECK:STDOUT: !42 = !{!41, !2, i64 0}
// CHECK:STDOUT: !43 = !DIFile(filename: "constructor.carbon", directory: "")
// CHECK:STDOUT: !44 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !43, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
// CHECK:STDOUT: !45 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64)
// CHECK:STDOUT: !46 = !{!45, !11}
// CHECK:STDOUT: !47 = !DISubroutineType(types: !46)
// CHECK:STDOUT: !48 = !{null, !45}
// CHECK:STDOUT: !49 = !DISubroutineType(types: !48)
// CHECK:STDOUT: !50 = !{null, !45, !11}
// CHECK:STDOUT: !51 = !DISubroutineType(types: !50)
// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "C", linkageName: "_CC.C.Main", scope: null, file: !43, line: 7, type: !47, spFlags: DISPFlagDefinition, unit: !44, retainedNodes: !60)
// CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !11)
// CHECK:STDOUT: !58 = !DILocation(line: 8, column: 12, scope: !52)
// CHECK:STDOUT: !59 = !DILocation(line: 8, column: 5, scope: !52)
// CHECK:STDOUT: !60 = !{!53}
// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.C.Main", scope: null, file: !43, line: 6, type: !49, spFlags: DISPFlagDefinition, unit: !44, retainedNodes: !64)
// CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !61, type: !45)
// CHECK:STDOUT: !63 = !DILocation(line: 6, column: 1, scope: !61)
// CHECK:STDOUT: !64 = !{!62}
// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "Op", linkageName: "_COp.d424893893628d5b:core.SubobjectDestroy.Core", scope: null, file: !43, line: 6, type: !49, spFlags: DISPFlagDefinition, unit: !44, retainedNodes: !70)
// CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !45)
// CHECK:STDOUT: !67 = !DILocation(line: 6, column: 1, scope: !65)
// CHECK:STDOUT: !68 = !{null, !11}
// CHECK:STDOUT: !69 = !DISubroutineType(types: !68)
// CHECK:STDOUT: !70 = !{!66}
// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "Op", linkageName: "_COp.08d9e38b928ba575:core.SubobjectDestroy.Core", scope: null, file: !43, line: 6, type: !49, spFlags: DISPFlagDefinition, unit: !44, retainedNodes: !74)
// CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !71, type: !45)
// CHECK:STDOUT: !73 = !DILocation(line: 6, column: 1, scope: !71)
// CHECK:STDOUT: !74 = !{!72}
// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "C__carbon_thunk", linkageName: "_CC__carbon_thunk.C.Main", scope: null, file: !43, line: 7, type: !51, spFlags: DISPFlagDefinition, unit: !44, retainedNodes: !79)
// CHECK:STDOUT: !76 = !DILocalVariable(arg: 1, scope: !75, type: !45)
// CHECK:STDOUT: !77 = !DILocalVariable(arg: 2, scope: !75, type: !11)
// CHECK:STDOUT: !78 = !DILocation(line: 7, column: 3, scope: !75)
// CHECK:STDOUT: !79 = !{!76, !77}
// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main", scope: null, file: !43, line: 21, type: !17, spFlags: DISPFlagDefinition, unit: !44)
// CHECK:STDOUT: !83 = !DILocation(line: 21, column: 24, scope: !80)
// CHECK:STDOUT: !84 = !DILocation(line: 21, column: 17, scope: !80)
// CHECK:STDOUT: !85 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "")
// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.356af3b6aef18564", scope: null, file: !85, line: 36, type: !49, spFlags: DISPFlagDefinition, unit: !44, retainedNodes: !92)
// CHECK:STDOUT: !87 = !DILocalVariable(arg: 1, scope: !86, type: !45)
// CHECK:STDOUT: !90 = !DILocation(line: 38, column: 5, scope: !86)
// CHECK:STDOUT: !91 = !DILocation(line: 36, column: 1, scope: !86)
// CHECK:STDOUT: !92 = !{!87}
// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !85, line: 36, type: !69, spFlags: DISPFlagDefinition, unit: !44, retainedNodes: !99)
// CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !93, type: !11)
// CHECK:STDOUT: !98 = !DILocation(line: 36, column: 1, scope: !93)
// CHECK:STDOUT: !99 = !{!94}
// CHECK:STDOUT: !100 = !{!"any pointer", !1, i64 0}
// CHECK:STDOUT: !101 = !{!"p1 _ZTSN6Carbon4Main1CE", !100, i64 0}
// CHECK:STDOUT: !102 = !{!101, !101, i64 0}
// CHECK:STDOUT:
@@ -107,8 +107,8 @@ int UseB() { return Carbon::Other::Identity(4); }
// CHECK:STDOUT: attributes #2 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
// CHECK:STDOUT:
// CHECK:STDOUT: !llvm.dbg.cu = !{!32}
// CHECK:STDOUT: !llvm.module.flags = !{!44, !45, !46, !2, !3}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!48}
// CHECK:STDOUT: !llvm.module.flags = !{!44, !45, !46, !47, !2, !3}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!49}
// CHECK:STDOUT:
// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5}
// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3}
@@ -127,11 +127,12 @@ int UseB() { return Carbon::Other::Identity(4); }
// CHECK:STDOUT: !41 = !{!"omnipotent char", !40, i64 0}
// CHECK:STDOUT: !42 = !{!"int", !41, i64 0}
// CHECK:STDOUT: !43 = !{!42, !42, i64 0}
// CHECK:STDOUT: !44 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !45 = !{i32 7, !"PIE Level", i32 2}
// CHECK:STDOUT: !46 = !{i32 7, !"uwtable", i32 2}
// CHECK:STDOUT: !47 = !{!"__libc_errno", !42, i64 0}
// CHECK:STDOUT: !48 = !{!47, !42, i64 0}
// CHECK:STDOUT: !44 = !{i32 2, !"debugger-tuning", !"gdb"}
// CHECK:STDOUT: !45 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !46 = !{i32 7, !"PIE Level", i32 2}
// CHECK:STDOUT: !47 = !{i32 7, !"uwtable", i32 2}
// CHECK:STDOUT: !48 = !{!"__libc_errno", !42, i64 0}
// CHECK:STDOUT: !49 = !{!48, !42, i64 0}
// CHECK:STDOUT:
// CHECK:STDOUT: ; ---
// CHECK:STDOUT: ; ModuleID = 'b.carbon'
@@ -160,21 +161,21 @@ int UseB() { return Carbon::Other::Identity(4); }
// CHECK:STDOUT: declare i32 @_CIdentity.Other(i32)
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define linkonce_odr void @_CIdentity__carbon_thunk.Other(ptr noundef nonnull align 4 dereferenceable(4) %_, ptr noundef nonnull align 4 dereferenceable(4) %_1) #2 !dbg !51 {
// CHECK:STDOUT: define linkonce_odr void @_CIdentity__carbon_thunk.Other(ptr noundef nonnull align 4 dereferenceable(4) %_, ptr noundef nonnull align 4 dereferenceable(4) %_1) #2 !dbg !52 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %.1 = load i32, ptr %_, align 4, !dbg !54
// CHECK:STDOUT: %Identity.call = call i32 @_CIdentity.Other(i32 %.1), !dbg !54
// CHECK:STDOUT: store i32 %Identity.call, ptr %_1, align 4, !dbg !54
// CHECK:STDOUT: ret void, !dbg !54
// CHECK:STDOUT: %.1 = load i32, ptr %_, align 4, !dbg !55
// CHECK:STDOUT: %Identity.call = call i32 @_CIdentity.Other(i32 %.1), !dbg !55
// CHECK:STDOUT: store i32 %Identity.call, ptr %_1, align 4, !dbg !55
// CHECK:STDOUT: ret void, !dbg !55
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
// CHECK:STDOUT: attributes #1 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
// CHECK:STDOUT: attributes #2 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
// CHECK:STDOUT:
// CHECK:STDOUT: !llvm.dbg.cu = !{!50}
// CHECK:STDOUT: !llvm.module.flags = !{!44, !45, !46, !2, !3}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!48}
// CHECK:STDOUT: !llvm.dbg.cu = !{!51}
// CHECK:STDOUT: !llvm.module.flags = !{!44, !45, !46, !47, !2, !3}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!49}
// CHECK:STDOUT:
// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5}
// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3}
@@ -186,16 +187,17 @@ int UseB() { return Carbon::Other::Identity(4); }
// CHECK:STDOUT: !41 = !{!"omnipotent char", !40, i64 0}
// CHECK:STDOUT: !42 = !{!"int", !41, i64 0}
// CHECK:STDOUT: !43 = !{!42, !42, i64 0}
// CHECK:STDOUT: !44 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !45 = !{i32 7, !"PIE Level", i32 2}
// CHECK:STDOUT: !46 = !{i32 7, !"uwtable", i32 2}
// CHECK:STDOUT: !47 = !{!"__libc_errno", !42, i64 0}
// CHECK:STDOUT: !48 = !{!47, !42, i64 0}
// CHECK:STDOUT: !49 = !DIFile(filename: "b.carbon", directory: "")
// CHECK:STDOUT: !50 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !49, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "Identity__carbon_thunk", linkageName: "_CIdentity__carbon_thunk.Other", scope: null, file: !18, line: 4, type: !34, spFlags: DISPFlagDefinition, unit: !50, retainedNodes: !55)
// CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !20)
// CHECK:STDOUT: !53 = !DILocalVariable(arg: 2, scope: !51, type: !20)
// CHECK:STDOUT: !54 = !DILocation(line: 4, column: 1, scope: !51)
// CHECK:STDOUT: !55 = !{!52, !53}
// CHECK:STDOUT: !44 = !{i32 2, !"debugger-tuning", !"gdb"}
// CHECK:STDOUT: !45 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !46 = !{i32 7, !"PIE Level", i32 2}
// CHECK:STDOUT: !47 = !{i32 7, !"uwtable", i32 2}
// CHECK:STDOUT: !48 = !{!"__libc_errno", !42, i64 0}
// CHECK:STDOUT: !49 = !{!48, !42, i64 0}
// CHECK:STDOUT: !50 = !DIFile(filename: "b.carbon", directory: "")
// CHECK:STDOUT: !51 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !50, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "Identity__carbon_thunk", linkageName: "_CIdentity__carbon_thunk.Other", scope: null, file: !18, line: 4, type: !34, spFlags: DISPFlagDefinition, unit: !51, retainedNodes: !56)
// CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !20)
// CHECK:STDOUT: !54 = !DILocalVariable(arg: 2, scope: !52, type: !20)
// CHECK:STDOUT: !55 = !DILocation(line: 4, column: 1, scope: !52)
// CHECK:STDOUT: !56 = !{!53, !54}
// CHECK:STDOUT: