| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329 |
- // 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/int.carbon
- //
- // AUTOUPDATE
- // TIP: To test this file alone, run:
- // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/lower/testdata/interop/cpp/constructor.carbon
- // TIP: To dump output, run:
- // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/lower/testdata/interop/cpp/constructor.carbon
- // ============================================================================
- // Default constructor
- // ============================================================================
- // --- default.h
- class C {
- public:
- C() : x_(8), y_(9) {}
- private:
- int x_;
- int y_;
- };
- // --- import_default.carbon
- library "[[@TEST_NAME]]";
- import Cpp library "default.h";
- fn F() {
- let _: Cpp.C = Cpp.C.C();
- }
- // ============================================================================
- // Copy constructor
- // ============================================================================
- // --- copy.h
- class Copy {
- public:
- Copy();
- Copy(const Copy&);
- private:
- int n;
- };
- // --- call_copy.carbon
- library "[[@TEST_NAME]]";
- import Cpp library "copy.h";
- fn Copy(c: Cpp.Copy) -> Cpp.Copy {
- return c;
- }
- // ============================================================================
- // C1 constructor
- // ============================================================================
- // --- header.h
- struct Base { };
- struct Derived: virtual Base {
- };
- // --- call_c1_in_thunk.carbon
- library "[[@TEST_NAME]]";
- import Cpp library "header.h";
- fn F() {
- let _: Cpp.Derived = Cpp.Derived.Derived();
- }
- // CHECK:STDOUT: ; ModuleID = 'import_default.carbon'
- // CHECK:STDOUT: source_filename = "import_default.carbon"
- // CHECK:STDOUT: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
- // CHECK:STDOUT: target triple = "x86_64-unknown-linux-gnu"
- // CHECK:STDOUT:
- // CHECK:STDOUT: %class.C = type { i32, i32 }
- // CHECK:STDOUT:
- // CHECK:STDOUT: $_ZN1CC2Ev = comdat any
- // CHECK:STDOUT:
- // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable
- // CHECK:STDOUT: define dso_local void @_ZN1CC1Ev.carbon_thunk(ptr noundef %return) #0 {
- // CHECK:STDOUT: entry:
- // CHECK:STDOUT: %return.addr = alloca ptr, align 8
- // CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !12
- // CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !12
- // CHECK:STDOUT: call void @_ZN1CC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %0)
- // CHECK:STDOUT: ret void
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: ; Function Attrs: mustprogress nounwind uwtable
- // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN1CC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %this) unnamed_addr #1 comdat align 2 {
- // CHECK:STDOUT: entry:
- // CHECK:STDOUT: %this.addr = alloca ptr, align 8
- // CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !12
- // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8
- // CHECK:STDOUT: %x_ = getelementptr inbounds nuw %class.C, ptr %this1, i32 0, i32 0
- // CHECK:STDOUT: store i32 8, ptr %x_, align 4, !tbaa !15
- // CHECK:STDOUT: %y_ = getelementptr inbounds nuw %class.C, ptr %this1, i32 0, i32 1
- // CHECK:STDOUT: store i32 9, ptr %y_, align 4, !tbaa !17
- // CHECK:STDOUT: ret void
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: ; Function Attrs: nounwind
- // CHECK:STDOUT: define void @_CF.Main() #2 !dbg !18 {
- // CHECK:STDOUT: entry:
- // CHECK:STDOUT: %.loc7_26.1.temp = alloca [8 x i8], align 1, !dbg !21
- // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_26.1.temp), !dbg !21
- // CHECK:STDOUT: call void @_ZN1CC1Ev.carbon_thunk(ptr %.loc7_26.1.temp), !dbg !21
- // CHECK:STDOUT: ret void, !dbg !22
- // 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)) #3
- // CHECK:STDOUT:
- // CHECK:STDOUT: attributes #0 = { alwaysinline 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 = { 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 }
- // CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
- // CHECK:STDOUT:
- // CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4, !5}
- // CHECK:STDOUT: !llvm.dbg.cu = !{!6}
- // CHECK:STDOUT: !llvm.errno.tbaa = !{!8}
- // CHECK:STDOUT:
- // CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5}
- // CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3}
- // CHECK:STDOUT: !2 = !{i32 1, !"wchar_size", i32 4}
- // CHECK:STDOUT: !3 = !{i32 8, !"PIC Level", i32 2}
- // CHECK:STDOUT: !4 = !{i32 7, !"PIE Level", i32 2}
- // CHECK:STDOUT: !5 = !{i32 7, !"uwtable", i32 2}
- // CHECK:STDOUT: !6 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !7, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
- // CHECK:STDOUT: !7 = !DIFile(filename: "import_default.carbon", directory: "")
- // CHECK:STDOUT: !8 = !{!9, !9, i64 0}
- // CHECK:STDOUT: !9 = !{!"int", !10, i64 0}
- // CHECK:STDOUT: !10 = !{!"omnipotent char", !11, i64 0}
- // CHECK:STDOUT: !11 = !{!"Simple C++ TBAA"}
- // CHECK:STDOUT: !12 = !{!13, !13, i64 0}
- // CHECK:STDOUT: !13 = !{!"p1 _ZTS1C", !14, i64 0}
- // CHECK:STDOUT: !14 = !{!"any pointer", !10, i64 0}
- // CHECK:STDOUT: !15 = !{!16, !9, i64 0}
- // CHECK:STDOUT: !16 = !{!"_ZTS1C", !9, i64 0, !9, i64 4}
- // CHECK:STDOUT: !17 = !{!16, !9, i64 4}
- // CHECK:STDOUT: !18 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !7, line: 6, type: !19, spFlags: DISPFlagDefinition, unit: !6)
- // CHECK:STDOUT: !19 = !DISubroutineType(types: !20)
- // CHECK:STDOUT: !20 = !{null}
- // CHECK:STDOUT: !21 = !DILocation(line: 7, column: 18, scope: !18)
- // CHECK:STDOUT: !22 = !DILocation(line: 6, column: 1, scope: !18)
- // CHECK:STDOUT: ; ModuleID = 'call_copy.carbon'
- // CHECK:STDOUT: source_filename = "call_copy.carbon"
- // CHECK:STDOUT: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
- // CHECK:STDOUT: target triple = "x86_64-unknown-linux-gnu"
- // CHECK:STDOUT:
- // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable
- // CHECK:STDOUT: define dso_local void @_ZN4CopyC1ERKS_.carbon_thunk(ptr noundef %0, ptr noundef %return) #0 {
- // CHECK:STDOUT: entry:
- // CHECK:STDOUT: %.addr = alloca ptr, align 8
- // CHECK:STDOUT: %return.addr = alloca ptr, align 8
- // CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !12
- // CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !12
- // CHECK:STDOUT: %1 = load ptr, ptr %return.addr, align 8, !tbaa !12
- // CHECK:STDOUT: %2 = load ptr, ptr %.addr, align 8, !tbaa !12
- // CHECK:STDOUT: call void @_ZN4CopyC1ERKS_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
- // CHECK:STDOUT: ret void
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: declare void @_ZN4CopyC1ERKS_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #1
- // CHECK:STDOUT:
- // CHECK:STDOUT: ; Function Attrs: nounwind
- // CHECK:STDOUT: define void @_CCopy.Main(ptr sret([4 x i8]) %return, ptr %c) #2 !dbg !15 {
- // CHECK:STDOUT: entry:
- // CHECK:STDOUT: %.loc7_10.1.temp = alloca [4 x i8], align 1, !dbg !21
- // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_10.1.temp), !dbg !21
- // CHECK:STDOUT: call void @_ZN4CopyC1ERKS_.carbon_thunk(ptr %c, ptr %return), !dbg !21
- // CHECK:STDOUT: ret void, !dbg !22
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind
- // CHECK:STDOUT: define void @"_COp:thunk.Copy.Cpp"(ptr sret([4 x i8]) %return, ptr %self) #3 !dbg !23 {
- // CHECK:STDOUT: entry:
- // CHECK:STDOUT: call void @_ZN4CopyC1ERKS_.carbon_thunk(ptr %self, ptr %return), !dbg !27
- // CHECK:STDOUT: ret void, !dbg !27
- // 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)) #4
- // CHECK:STDOUT:
- // CHECK:STDOUT: attributes #0 = { alwaysinline 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 = { "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 }
- // CHECK:STDOUT: attributes #3 = { alwaysinline nounwind }
- // CHECK:STDOUT: attributes #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
- // CHECK:STDOUT:
- // CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4, !5}
- // CHECK:STDOUT: !llvm.dbg.cu = !{!6}
- // CHECK:STDOUT: !llvm.errno.tbaa = !{!8}
- // CHECK:STDOUT:
- // CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5}
- // CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3}
- // CHECK:STDOUT: !2 = !{i32 1, !"wchar_size", i32 4}
- // CHECK:STDOUT: !3 = !{i32 8, !"PIC Level", i32 2}
- // CHECK:STDOUT: !4 = !{i32 7, !"PIE Level", i32 2}
- // CHECK:STDOUT: !5 = !{i32 7, !"uwtable", i32 2}
- // CHECK:STDOUT: !6 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !7, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
- // CHECK:STDOUT: !7 = !DIFile(filename: "call_copy.carbon", directory: "")
- // CHECK:STDOUT: !8 = !{!9, !9, i64 0}
- // CHECK:STDOUT: !9 = !{!"int", !10, i64 0}
- // CHECK:STDOUT: !10 = !{!"omnipotent char", !11, i64 0}
- // CHECK:STDOUT: !11 = !{!"Simple C++ TBAA"}
- // CHECK:STDOUT: !12 = !{!13, !13, i64 0}
- // CHECK:STDOUT: !13 = !{!"p1 _ZTS4Copy", !14, i64 0}
- // CHECK:STDOUT: !14 = !{!"any pointer", !10, i64 0}
- // CHECK:STDOUT: !15 = distinct !DISubprogram(name: "Copy", linkageName: "_CCopy.Main", scope: null, file: !7, line: 6, type: !16, spFlags: DISPFlagDefinition, unit: !6, retainedNodes: !19)
- // CHECK:STDOUT: !16 = !DISubroutineType(types: !17)
- // CHECK:STDOUT: !17 = !{!18, !18}
- // CHECK:STDOUT: !18 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 8)
- // CHECK:STDOUT: !19 = !{!20}
- // CHECK:STDOUT: !20 = !DILocalVariable(arg: 1, scope: !15, type: !18)
- // CHECK:STDOUT: !21 = !DILocation(line: 7, column: 10, scope: !15)
- // CHECK:STDOUT: !22 = !DILocation(line: 7, column: 3, scope: !15)
- // CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk.Copy.Cpp", scope: null, file: !24, line: 5, type: !16, spFlags: DISPFlagDefinition, unit: !6, retainedNodes: !25)
- // CHECK:STDOUT: !24 = !DIFile(filename: "./copy.h", directory: "")
- // CHECK:STDOUT: !25 = !{!26}
- // CHECK:STDOUT: !26 = !DILocalVariable(arg: 1, scope: !23, type: !18)
- // CHECK:STDOUT: !27 = !DILocation(line: 5, column: 3, scope: !23)
- // CHECK:STDOUT: ; ModuleID = 'call_c1_in_thunk.carbon'
- // CHECK:STDOUT: source_filename = "call_c1_in_thunk.carbon"
- // CHECK:STDOUT: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
- // CHECK:STDOUT: target triple = "x86_64-unknown-linux-gnu"
- // CHECK:STDOUT:
- // CHECK:STDOUT: $_ZN7DerivedC1Ev = comdat any
- // CHECK:STDOUT:
- // CHECK:STDOUT: $_ZTV7Derived = comdat any
- // CHECK:STDOUT:
- // CHECK:STDOUT: $_ZTT7Derived = comdat any
- // CHECK:STDOUT:
- // CHECK:STDOUT: $_ZTI7Derived = comdat any
- // CHECK:STDOUT:
- // CHECK:STDOUT: $_ZTS7Derived = comdat any
- // CHECK:STDOUT:
- // CHECK:STDOUT: $_ZTI4Base = comdat any
- // CHECK:STDOUT:
- // CHECK:STDOUT: $_ZTS4Base = comdat any
- // CHECK:STDOUT:
- // CHECK:STDOUT: @_ZTV7Derived = linkonce_odr dso_local unnamed_addr constant { [3 x ptr] } { [3 x ptr] [ptr null, ptr null, ptr @_ZTI7Derived] }, comdat, align 8
- // CHECK:STDOUT: @_ZTT7Derived = linkonce_odr dso_local unnamed_addr constant [1 x ptr] [ptr getelementptr inbounds inrange(-24, 0) ({ [3 x ptr] }, ptr @_ZTV7Derived, i32 0, i32 0, i32 3)], comdat, align 8
- // CHECK:STDOUT: @_ZTI7Derived = linkonce_odr dso_local constant { ptr, ptr, i32, i32, ptr, i64 } { ptr getelementptr inbounds (ptr, ptr @_ZTVN10__cxxabiv121__vmi_class_type_infoE, i64 2), ptr @_ZTS7Derived, i32 0, i32 1, ptr @_ZTI4Base, i64 -6141 }, comdat, align 8
- // CHECK:STDOUT: @_ZTVN10__cxxabiv121__vmi_class_type_infoE = external global [0 x ptr]
- // CHECK:STDOUT: @_ZTS7Derived = linkonce_odr dso_local constant [9 x i8] c"7Derived\00", comdat, align 1
- // CHECK:STDOUT: @_ZTI4Base = linkonce_odr dso_local constant { ptr, ptr } { ptr getelementptr inbounds (ptr, ptr @_ZTVN10__cxxabiv117__class_type_infoE, i64 2), ptr @_ZTS4Base }, comdat, align 8
- // CHECK:STDOUT: @_ZTVN10__cxxabiv117__class_type_infoE = external global [0 x ptr]
- // CHECK:STDOUT: @_ZTS4Base = linkonce_odr dso_local constant [6 x i8] c"4Base\00", comdat, align 1
- // CHECK:STDOUT:
- // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress nounwind uwtable
- // CHECK:STDOUT: define dso_local void @_ZN7DerivedC1Ev.carbon_thunk(ptr noundef %return) #0 {
- // CHECK:STDOUT: entry:
- // CHECK:STDOUT: %return.addr = alloca ptr, align 8
- // CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !12
- // CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !12
- // CHECK:STDOUT: call void @_ZN7DerivedC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #2
- // CHECK:STDOUT: ret void
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: ; Function Attrs: inlinehint mustprogress nounwind uwtable
- // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN7DerivedC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %this) unnamed_addr #1 comdat align 2 {
- // CHECK:STDOUT: entry:
- // CHECK:STDOUT: %this.addr = alloca ptr, align 8
- // CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !12
- // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8
- // CHECK:STDOUT: store ptr getelementptr inbounds inrange(-24, 0) ({ [3 x ptr] }, ptr @_ZTV7Derived, i32 0, i32 0, i32 3), ptr %this1, align 8, !tbaa !15
- // CHECK:STDOUT: ret void
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: ; Function Attrs: nounwind
- // CHECK:STDOUT: define void @_CF.Main() #2 !dbg !17 {
- // CHECK:STDOUT: entry:
- // CHECK:STDOUT: %.loc7_44.1.temp = alloca [8 x i8], align 1, !dbg !20
- // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_44.1.temp), !dbg !20
- // CHECK:STDOUT: call void @_ZN7DerivedC1Ev.carbon_thunk(ptr %.loc7_44.1.temp), !dbg !20
- // CHECK:STDOUT: ret void, !dbg !21
- // 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)) #3
- // CHECK:STDOUT:
- // CHECK:STDOUT: ; uselistorder directives
- // CHECK:STDOUT: uselistorder ptr getelementptr inbounds inrange(-24, 0) ({ [3 x ptr] }, ptr @_ZTV7Derived, i32 0, i32 0, i32 3), { 1, 0 }
- // CHECK:STDOUT:
- // CHECK:STDOUT: attributes #0 = { 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 #1 = { inlinehint 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 }
- // CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
- // CHECK:STDOUT:
- // CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4, !5}
- // CHECK:STDOUT: !llvm.dbg.cu = !{!6}
- // CHECK:STDOUT: !llvm.errno.tbaa = !{!8}
- // CHECK:STDOUT:
- // CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5}
- // CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3}
- // CHECK:STDOUT: !2 = !{i32 1, !"wchar_size", i32 4}
- // CHECK:STDOUT: !3 = !{i32 8, !"PIC Level", i32 2}
- // CHECK:STDOUT: !4 = !{i32 7, !"PIE Level", i32 2}
- // CHECK:STDOUT: !5 = !{i32 7, !"uwtable", i32 2}
- // CHECK:STDOUT: !6 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !7, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
- // CHECK:STDOUT: !7 = !DIFile(filename: "call_c1_in_thunk.carbon", directory: "")
- // CHECK:STDOUT: !8 = !{!9, !9, i64 0}
- // CHECK:STDOUT: !9 = !{!"int", !10, i64 0}
- // CHECK:STDOUT: !10 = !{!"omnipotent char", !11, i64 0}
- // CHECK:STDOUT: !11 = !{!"Simple C++ TBAA"}
- // CHECK:STDOUT: !12 = !{!13, !13, i64 0}
- // CHECK:STDOUT: !13 = !{!"p1 _ZTS7Derived", !14, i64 0}
- // CHECK:STDOUT: !14 = !{!"any pointer", !10, i64 0}
- // CHECK:STDOUT: !15 = !{!16, !16, i64 0}
- // CHECK:STDOUT: !16 = !{!"vtable pointer", !11, i64 0}
- // CHECK:STDOUT: !17 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !7, line: 6, type: !18, spFlags: DISPFlagDefinition, unit: !6)
- // CHECK:STDOUT: !18 = !DISubroutineType(types: !19)
- // CHECK:STDOUT: !19 = !{null}
- // CHECK:STDOUT: !20 = !DILocation(line: 7, column: 24, scope: !17)
- // CHECK:STDOUT: !21 = !DILocation(line: 6, column: 1, scope: !17)
|