|
|
@@ -118,28 +118,84 @@ fn InitNontrivialDtor() {
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: %"class.std::initializer_list" = type { ptr, ptr }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: $_ZN11vector_likeC2ESt16initializer_listIiE = comdat any
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: $_ZN15nontrivial_dtorC2Ev = comdat any
|
|
|
-// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: $_ZN11vector_likeD2Ev = comdat any
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: $_ZN15nontrivial_dtorD2Ev = comdat any
|
|
|
// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: $_ZN11vector_likeC2ESt16initializer_listIiE = comdat any
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: $_ZN15nontrivial_dtorC2Ev = comdat any
|
|
|
+// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: @array = internal constant [3 x i32] [i32 1, i32 2, i32 3]
|
|
|
// CHECK:STDOUT: @array.loc13_50.15 = internal constant [3 x i32] [i32 1, i32 2, i32 3]
|
|
|
// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: declare void @_CWithinLifetime.Main()
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: ; Function Attrs: nounwind
|
|
|
+// CHECK:STDOUT: define void @_CInitDirectly.Main() #0 !dbg !11 {
|
|
|
+// CHECK:STDOUT: entry:
|
|
|
+// CHECK:STDOUT: %_.var = alloca [16 x i8], align 1, !dbg !14
|
|
|
+// CHECK:STDOUT: %.loc13_50.3.temp = alloca [3 x i32], align 4, !dbg !15
|
|
|
+// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !14
|
|
|
+// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc13_50.3.temp), !dbg !15
|
|
|
+// CHECK:STDOUT: %.loc13_50.4.array.index = getelementptr inbounds [3 x i32], ptr %.loc13_50.3.temp, i32 0, i64 0, !dbg !15
|
|
|
+// CHECK:STDOUT: %.loc13_50.7.array.index = getelementptr inbounds [3 x i32], ptr %.loc13_50.3.temp, i32 0, i64 1, !dbg !15
|
|
|
+// CHECK:STDOUT: %.loc13_50.10.array.index = getelementptr inbounds [3 x i32], ptr %.loc13_50.3.temp, i32 0, i64 2, !dbg !15
|
|
|
+// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.begin = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 0, !dbg !14
|
|
|
+// CHECK:STDOUT: store ptr @array.loc13_50.15, ptr %initializer_list.initializer_list.call.init_list.begin, align 8, !dbg !14
|
|
|
+// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.end = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 8, !dbg !14
|
|
|
+// CHECK:STDOUT: store ptr getelementptr inbounds ([3 x i32], ptr @array.loc13_50.15, i32 1), ptr %initializer_list.initializer_list.call.init_list.end, align 8, !dbg !14
|
|
|
+// CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !16
|
|
|
+// CHECK:STDOUT: call void @"_COp.bfd302cd235977c4:core.Destroy.Core"(ptr @array), !dbg !15
|
|
|
+// CHECK:STDOUT: ret void, !dbg !17
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: ; Function Attrs: nounwind
|
|
|
+// CHECK:STDOUT: define weak_odr void @"_COp.7e389eab4a7e5487:core.Destroy.Core"(ptr %self) #0 !dbg !18 {
|
|
|
+// CHECK:STDOUT: entry:
|
|
|
+// CHECK:STDOUT: ret void, !dbg !24
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: ; Function Attrs: nounwind
|
|
|
+// CHECK:STDOUT: define weak_odr void @"_COp.bfd302cd235977c4:core.Destroy.Core"(ptr %self) #0 !dbg !25 {
|
|
|
+// CHECK:STDOUT: entry:
|
|
|
+// CHECK:STDOUT: ret void, !dbg !31
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: ; Function Attrs: nounwind
|
|
|
+// CHECK:STDOUT: define void @_CInitVectorLike.Main() #0 !dbg !32 {
|
|
|
+// CHECK:STDOUT: entry:
|
|
|
+// CHECK:STDOUT: %_.var = alloca [1 x i8], align 1, !dbg !33
|
|
|
+// CHECK:STDOUT: %.loc18_36.2.temp = alloca [16 x i8], align 1, !dbg !34
|
|
|
+// CHECK:STDOUT: %.loc18_36.4.temp = alloca [3 x i32], align 4, !dbg !34
|
|
|
+// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !33
|
|
|
+// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_36.2.temp), !dbg !34
|
|
|
+// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_36.4.temp), !dbg !34
|
|
|
+// CHECK:STDOUT: %.loc18_36.5.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_36.4.temp, i32 0, i64 0, !dbg !34
|
|
|
+// CHECK:STDOUT: %.loc18_36.8.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_36.4.temp, i32 0, i64 1, !dbg !34
|
|
|
+// CHECK:STDOUT: %.loc18_36.11.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_36.4.temp, i32 0, i64 2, !dbg !34
|
|
|
+// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.begin = getelementptr inbounds nuw [16 x i8], ptr %.loc18_36.2.temp, i32 0, i32 0, !dbg !34
|
|
|
+// CHECK:STDOUT: store ptr @array.loc13_50.15, ptr %initializer_list.initializer_list.call.init_list.begin, align 8, !dbg !34
|
|
|
+// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.end = getelementptr inbounds nuw [16 x i8], ptr %.loc18_36.2.temp, i32 0, i32 8, !dbg !34
|
|
|
+// CHECK:STDOUT: store ptr getelementptr inbounds ([3 x i32], ptr @array.loc13_50.15, i32 1), ptr %initializer_list.initializer_list.call.init_list.end, align 8, !dbg !34
|
|
|
+// CHECK:STDOUT: call void @_ZN11vector_likeC1ESt16initializer_listIiE.carbon_thunk(ptr %.loc18_36.2.temp, ptr %_.var), !dbg !33
|
|
|
+// CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !35
|
|
|
+// CHECK:STDOUT: call void @"_COp.bfd302cd235977c4:core.Destroy.Core"(ptr @array), !dbg !34
|
|
|
+// CHECK:STDOUT: call void @_ZN11vector_likeD2Ev(ptr %_.var), !dbg !33
|
|
|
+// CHECK:STDOUT: ret void, !dbg !36
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable
|
|
|
-// CHECK:STDOUT: define dso_local void @_ZN11vector_likeC1ESt16initializer_listIiE.carbon_thunk(ptr noundef %list, ptr noundef %return) #0 {
|
|
|
+// CHECK:STDOUT: define internal void @_ZN11vector_likeC1ESt16initializer_listIiE.carbon_thunk(ptr noundef %list, ptr noundef %return) #1 {
|
|
|
// CHECK:STDOUT: entry:
|
|
|
// CHECK:STDOUT: %list.addr = alloca ptr, align 8
|
|
|
// CHECK:STDOUT: %return.addr = alloca ptr, align 8
|
|
|
// CHECK:STDOUT: %agg.tmp = alloca %"class.std::initializer_list", align 8
|
|
|
-// CHECK:STDOUT: store ptr %list, ptr %list.addr, align 8, !tbaa !11
|
|
|
-// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !14
|
|
|
-// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !14
|
|
|
-// CHECK:STDOUT: %1 = load ptr, ptr %list.addr, align 8, !tbaa !11
|
|
|
-// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %agg.tmp, ptr align 8 %1, i64 16, i1 false), !tbaa.struct !16
|
|
|
+// CHECK:STDOUT: store ptr %list, ptr %list.addr, align 8, !tbaa !37
|
|
|
+// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !40
|
|
|
+// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !40
|
|
|
+// CHECK:STDOUT: %1 = load ptr, ptr %list.addr, align 8, !tbaa !37
|
|
|
+// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %agg.tmp, ptr align 8 %1, i64 16, i1 false), !tbaa.struct !42
|
|
|
// CHECK:STDOUT: %2 = getelementptr inbounds nuw { ptr, ptr }, ptr %agg.tmp, i32 0, i32 0
|
|
|
// CHECK:STDOUT: %3 = load ptr, ptr %2, align 8
|
|
|
// CHECK:STDOUT: %4 = getelementptr inbounds nuw { ptr, ptr }, ptr %agg.tmp, i32 0, i32 1
|
|
|
@@ -148,156 +204,101 @@ fn InitNontrivialDtor() {
|
|
|
// CHECK:STDOUT: ret void
|
|
|
// CHECK:STDOUT: }
|
|
|
// 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) #1
|
|
|
-// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: ; Function Attrs: mustprogress nounwind uwtable
|
|
|
-// CHECK:STDOUT: define linkonce_odr dso_local void @_ZN11vector_likeC2ESt16initializer_listIiE(ptr noundef nonnull align 1 dereferenceable(1) %this, ptr %list.coerce0, ptr %list.coerce1) unnamed_addr #2 comdat align 2 {
|
|
|
+// CHECK:STDOUT: define linkonce_odr dso_local void @_ZN11vector_likeD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %this) unnamed_addr #2 comdat align 2 {
|
|
|
// CHECK:STDOUT: entry:
|
|
|
-// CHECK:STDOUT: %list = alloca %"class.std::initializer_list", align 8
|
|
|
// CHECK:STDOUT: %this.addr = alloca ptr, align 8
|
|
|
-// CHECK:STDOUT: %0 = getelementptr inbounds nuw { ptr, ptr }, ptr %list, i32 0, i32 0
|
|
|
-// CHECK:STDOUT: store ptr %list.coerce0, ptr %0, align 8
|
|
|
-// CHECK:STDOUT: %1 = getelementptr inbounds nuw { ptr, ptr }, ptr %list, i32 0, i32 1
|
|
|
-// CHECK:STDOUT: store ptr %list.coerce1, ptr %1, align 8
|
|
|
-// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !14
|
|
|
+// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !40
|
|
|
// CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8
|
|
|
// CHECK:STDOUT: ret void
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: ; Function Attrs: nounwind
|
|
|
+// CHECK:STDOUT: define void @_CInitNontrivialDtor.Main() #0 !dbg !45 {
|
|
|
+// CHECK:STDOUT: entry:
|
|
|
+// CHECK:STDOUT: %_.var = alloca [16 x i8], align 1, !dbg !46
|
|
|
+// CHECK:STDOUT: %.loc23_69.17.temp = alloca [3 x [1 x i8]], align 1, !dbg !47
|
|
|
+// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !46
|
|
|
+// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc23_69.17.temp), !dbg !47
|
|
|
+// CHECK:STDOUT: %.loc23_69.18.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.17.temp, i32 0, i64 0, !dbg !47
|
|
|
+// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple(ptr %.loc23_69.18.array.index), !dbg !47
|
|
|
+// CHECK:STDOUT: %.loc23_69.16.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.17.temp, i32 0, i64 1, !dbg !47
|
|
|
+// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple(ptr %.loc23_69.16.array.index), !dbg !47
|
|
|
+// CHECK:STDOUT: %.loc23_69.15.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.17.temp, i32 0, i64 2, !dbg !47
|
|
|
+// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple(ptr %.loc23_69.15.array.index), !dbg !47
|
|
|
+// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.begin = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 0, !dbg !46
|
|
|
+// CHECK:STDOUT: store ptr %.loc23_69.17.temp, ptr %initializer_list.initializer_list.call.init_list.begin, align 8, !dbg !46
|
|
|
+// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.end = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 8, !dbg !46
|
|
|
+// CHECK:STDOUT: %initializer_list.initializer_list.call.array.end = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.17.temp, i32 1, !dbg !46
|
|
|
+// CHECK:STDOUT: store ptr %initializer_list.initializer_list.call.array.end, ptr %initializer_list.initializer_list.call.init_list.end, align 8, !dbg !46
|
|
|
+// CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !48
|
|
|
+// CHECK:STDOUT: call void @"_COp.3c5ceecfa63e1bfb:core.Destroy.Core"(ptr %.loc23_69.17.temp), !dbg !47
|
|
|
+// CHECK:STDOUT: ret void, !dbg !49
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable
|
|
|
-// CHECK:STDOUT: define dso_local void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple(ptr noundef %return) #0 {
|
|
|
+// CHECK:STDOUT: define internal void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple(ptr noundef %return) #1 {
|
|
|
// CHECK:STDOUT: entry:
|
|
|
// CHECK:STDOUT: %return.addr = alloca ptr, align 8
|
|
|
-// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !19
|
|
|
-// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !19
|
|
|
+// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !50
|
|
|
+// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !50
|
|
|
// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %0)
|
|
|
// CHECK:STDOUT: ret void
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: ; Function Attrs: mustprogress nounwind uwtable
|
|
|
-// CHECK:STDOUT: define linkonce_odr dso_local void @_ZN15nontrivial_dtorC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %this) unnamed_addr #2 comdat align 2 {
|
|
|
+// CHECK:STDOUT: define linkonce_odr dso_local void @_ZN15nontrivial_dtorD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %this) unnamed_addr #2 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 !19
|
|
|
+// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !50
|
|
|
// CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8
|
|
|
// CHECK:STDOUT: ret void
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: declare void @_CWithinLifetime.Main()
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: ; Function Attrs: nounwind
|
|
|
-// CHECK:STDOUT: define void @_CInitDirectly.Main() #3 !dbg !21 {
|
|
|
-// CHECK:STDOUT: entry:
|
|
|
-// CHECK:STDOUT: %_.var = alloca [16 x i8], align 1, !dbg !24
|
|
|
-// CHECK:STDOUT: %.loc13_50.3.temp = alloca [3 x i32], align 4, !dbg !25
|
|
|
-// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !24
|
|
|
-// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc13_50.3.temp), !dbg !25
|
|
|
-// CHECK:STDOUT: %.loc13_50.4.array.index = getelementptr inbounds [3 x i32], ptr %.loc13_50.3.temp, i32 0, i64 0, !dbg !25
|
|
|
-// CHECK:STDOUT: %.loc13_50.7.array.index = getelementptr inbounds [3 x i32], ptr %.loc13_50.3.temp, i32 0, i64 1, !dbg !25
|
|
|
-// CHECK:STDOUT: %.loc13_50.10.array.index = getelementptr inbounds [3 x i32], ptr %.loc13_50.3.temp, i32 0, i64 2, !dbg !25
|
|
|
-// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.begin = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 0, !dbg !24
|
|
|
-// CHECK:STDOUT: store ptr @array.loc13_50.15, ptr %initializer_list.initializer_list.call.init_list.begin, align 8, !dbg !24
|
|
|
-// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.end = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 8, !dbg !24
|
|
|
-// CHECK:STDOUT: store ptr getelementptr inbounds ([3 x i32], ptr @array.loc13_50.15, i32 1), ptr %initializer_list.initializer_list.call.init_list.end, align 8, !dbg !24
|
|
|
-// CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !26
|
|
|
-// CHECK:STDOUT: call void @"_COp.bfd302cd235977c4:core.Destroy.Core"(ptr @array), !dbg !25
|
|
|
-// CHECK:STDOUT: ret void, !dbg !27
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: ; Function Attrs: nounwind
|
|
|
-// CHECK:STDOUT: define weak_odr void @"_COp.7e389eab4a7e5487:core.Destroy.Core"(ptr %self) #3 !dbg !28 {
|
|
|
+// CHECK:STDOUT: define weak_odr void @"_COp.3c5ceecfa63e1bfb:core.Destroy.Core"(ptr %self) #0 !dbg !52 {
|
|
|
// CHECK:STDOUT: entry:
|
|
|
-// CHECK:STDOUT: ret void, !dbg !34
|
|
|
+// CHECK:STDOUT: ret void, !dbg !55
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: ; Function Attrs: nounwind
|
|
|
-// CHECK:STDOUT: define weak_odr void @"_COp.bfd302cd235977c4:core.Destroy.Core"(ptr %self) #3 !dbg !35 {
|
|
|
-// CHECK:STDOUT: entry:
|
|
|
-// CHECK:STDOUT: ret void, !dbg !41
|
|
|
-// 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: ; Function Attrs: nounwind
|
|
|
-// CHECK:STDOUT: define void @_CInitVectorLike.Main() #3 !dbg !42 {
|
|
|
-// CHECK:STDOUT: entry:
|
|
|
-// CHECK:STDOUT: %_.var = alloca [1 x i8], align 1, !dbg !43
|
|
|
-// CHECK:STDOUT: %.loc18_36.2.temp = alloca [16 x i8], align 1, !dbg !44
|
|
|
-// CHECK:STDOUT: %.loc18_36.4.temp = alloca [3 x i32], align 4, !dbg !44
|
|
|
-// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !43
|
|
|
-// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_36.2.temp), !dbg !44
|
|
|
-// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_36.4.temp), !dbg !44
|
|
|
-// CHECK:STDOUT: %.loc18_36.5.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_36.4.temp, i32 0, i64 0, !dbg !44
|
|
|
-// CHECK:STDOUT: %.loc18_36.8.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_36.4.temp, i32 0, i64 1, !dbg !44
|
|
|
-// CHECK:STDOUT: %.loc18_36.11.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_36.4.temp, i32 0, i64 2, !dbg !44
|
|
|
-// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.begin = getelementptr inbounds nuw [16 x i8], ptr %.loc18_36.2.temp, i32 0, i32 0, !dbg !44
|
|
|
-// CHECK:STDOUT: store ptr @array.loc13_50.15, ptr %initializer_list.initializer_list.call.init_list.begin, align 8, !dbg !44
|
|
|
-// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.end = getelementptr inbounds nuw [16 x i8], ptr %.loc18_36.2.temp, i32 0, i32 8, !dbg !44
|
|
|
-// CHECK:STDOUT: store ptr getelementptr inbounds ([3 x i32], ptr @array.loc13_50.15, i32 1), ptr %initializer_list.initializer_list.call.init_list.end, align 8, !dbg !44
|
|
|
-// CHECK:STDOUT: call void @_ZN11vector_likeC1ESt16initializer_listIiE.carbon_thunk(ptr %.loc18_36.2.temp, ptr %_.var), !dbg !43
|
|
|
-// CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !45
|
|
|
-// CHECK:STDOUT: call void @"_COp.bfd302cd235977c4:core.Destroy.Core"(ptr @array), !dbg !44
|
|
|
-// CHECK:STDOUT: call void @_ZN11vector_likeD2Ev(ptr %_.var), !dbg !43
|
|
|
-// CHECK:STDOUT: ret void, !dbg !46
|
|
|
-// 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) #4
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: ; Function Attrs: mustprogress nounwind uwtable
|
|
|
-// CHECK:STDOUT: define linkonce_odr dso_local void @_ZN11vector_likeD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %this) unnamed_addr #2 comdat align 2 {
|
|
|
+// CHECK:STDOUT: define linkonce_odr dso_local void @_ZN11vector_likeC2ESt16initializer_listIiE(ptr noundef nonnull align 1 dereferenceable(1) %this, ptr %list.coerce0, ptr %list.coerce1) unnamed_addr #2 comdat align 2 {
|
|
|
// CHECK:STDOUT: entry:
|
|
|
+// CHECK:STDOUT: %list = alloca %"class.std::initializer_list", align 8
|
|
|
// CHECK:STDOUT: %this.addr = alloca ptr, align 8
|
|
|
-// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !14
|
|
|
+// CHECK:STDOUT: %0 = getelementptr inbounds nuw { ptr, ptr }, ptr %list, i32 0, i32 0
|
|
|
+// CHECK:STDOUT: store ptr %list.coerce0, ptr %0, align 8
|
|
|
+// CHECK:STDOUT: %1 = getelementptr inbounds nuw { ptr, ptr }, ptr %list, i32 0, i32 1
|
|
|
+// CHECK:STDOUT: store ptr %list.coerce1, ptr %1, align 8
|
|
|
+// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !40
|
|
|
// CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8
|
|
|
// CHECK:STDOUT: ret void
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: ; Function Attrs: nounwind
|
|
|
-// CHECK:STDOUT: define void @_CInitNontrivialDtor.Main() #3 !dbg !47 {
|
|
|
-// CHECK:STDOUT: entry:
|
|
|
-// CHECK:STDOUT: %_.var = alloca [16 x i8], align 1, !dbg !48
|
|
|
-// CHECK:STDOUT: %.loc23_69.17.temp = alloca [3 x [1 x i8]], align 1, !dbg !49
|
|
|
-// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !48
|
|
|
-// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc23_69.17.temp), !dbg !49
|
|
|
-// CHECK:STDOUT: %.loc23_69.18.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.17.temp, i32 0, i64 0, !dbg !49
|
|
|
-// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple(ptr %.loc23_69.18.array.index), !dbg !49
|
|
|
-// CHECK:STDOUT: %.loc23_69.16.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.17.temp, i32 0, i64 1, !dbg !49
|
|
|
-// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple(ptr %.loc23_69.16.array.index), !dbg !49
|
|
|
-// CHECK:STDOUT: %.loc23_69.15.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.17.temp, i32 0, i64 2, !dbg !49
|
|
|
-// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple(ptr %.loc23_69.15.array.index), !dbg !49
|
|
|
-// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.begin = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 0, !dbg !48
|
|
|
-// CHECK:STDOUT: store ptr %.loc23_69.17.temp, ptr %initializer_list.initializer_list.call.init_list.begin, align 8, !dbg !48
|
|
|
-// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.end = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 8, !dbg !48
|
|
|
-// CHECK:STDOUT: %initializer_list.initializer_list.call.array.end = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.17.temp, i32 1, !dbg !48
|
|
|
-// CHECK:STDOUT: store ptr %initializer_list.initializer_list.call.array.end, ptr %initializer_list.initializer_list.call.init_list.end, align 8, !dbg !48
|
|
|
-// CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !50
|
|
|
-// CHECK:STDOUT: call void @"_COp.3c5ceecfa63e1bfb:core.Destroy.Core"(ptr %.loc23_69.17.temp), !dbg !49
|
|
|
-// CHECK:STDOUT: ret void, !dbg !51
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: ; Function Attrs: mustprogress nounwind uwtable
|
|
|
-// CHECK:STDOUT: define linkonce_odr dso_local void @_ZN15nontrivial_dtorD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %this) unnamed_addr #2 comdat align 2 {
|
|
|
+// CHECK:STDOUT: define linkonce_odr dso_local void @_ZN15nontrivial_dtorC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %this) unnamed_addr #2 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 !19
|
|
|
+// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !50
|
|
|
// CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8
|
|
|
// CHECK:STDOUT: ret void
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: ; Function Attrs: nounwind
|
|
|
-// CHECK:STDOUT: define weak_odr void @"_COp.3c5ceecfa63e1bfb:core.Destroy.Core"(ptr %self) #3 !dbg !52 {
|
|
|
-// CHECK:STDOUT: entry:
|
|
|
-// CHECK:STDOUT: ret void, !dbg !55
|
|
|
-// 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: ; uselistorder directives
|
|
|
+// CHECK:STDOUT: uselistorder ptr @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple, { 2, 1, 0 }
|
|
|
// CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 6, 5, 4, 3, 2, 1, 0 }
|
|
|
// 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
|
|
|
+// CHECK:STDOUT: attributes #0 = { nounwind }
|
|
|
+// CHECK:STDOUT: attributes #1 = { 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 #2 = { 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 #3 = { nounwind }
|
|
|
-// CHECK:STDOUT: attributes #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
|
|
|
+// CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
|
|
|
+// CHECK:STDOUT: attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4}
|
|
|
// CHECK:STDOUT: !llvm.dbg.cu = !{!5}
|
|
|
@@ -314,50 +315,50 @@ fn InitNontrivialDtor() {
|
|
|
// CHECK:STDOUT: !8 = !{!"int", !9, i64 0}
|
|
|
// CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0}
|
|
|
// CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"}
|
|
|
-// CHECK:STDOUT: !11 = !{!12, !12, i64 0}
|
|
|
-// CHECK:STDOUT: !12 = !{!"p1 _ZTSSt16initializer_listIiE", !13, i64 0}
|
|
|
-// CHECK:STDOUT: !13 = !{!"any pointer", !9, i64 0}
|
|
|
-// CHECK:STDOUT: !14 = !{!15, !15, i64 0}
|
|
|
-// CHECK:STDOUT: !15 = !{!"p1 _ZTS11vector_like", !13, i64 0}
|
|
|
-// CHECK:STDOUT: !16 = !{i64 0, i64 8, !17, i64 8, i64 8, !17}
|
|
|
-// CHECK:STDOUT: !17 = !{!18, !18, i64 0}
|
|
|
-// CHECK:STDOUT: !18 = !{!"p1 int", !13, i64 0}
|
|
|
-// CHECK:STDOUT: !19 = !{!20, !20, i64 0}
|
|
|
-// CHECK:STDOUT: !20 = !{!"p1 _ZTS15nontrivial_dtor", !13, i64 0}
|
|
|
-// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "InitDirectly", linkageName: "_CInitDirectly.Main", scope: null, file: !6, line: 12, type: !22, spFlags: DISPFlagDefinition, unit: !5)
|
|
|
-// CHECK:STDOUT: !22 = !DISubroutineType(types: !23)
|
|
|
-// CHECK:STDOUT: !23 = !{null}
|
|
|
-// CHECK:STDOUT: !24 = !DILocation(line: 13, column: 3, scope: !21)
|
|
|
-// CHECK:STDOUT: !25 = !DILocation(line: 13, column: 42, scope: !21)
|
|
|
-// CHECK:STDOUT: !26 = !DILocation(line: 14, column: 3, scope: !21)
|
|
|
-// CHECK:STDOUT: !27 = !DILocation(line: 12, column: 1, scope: !21)
|
|
|
-// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Op", linkageName: "_COp.7e389eab4a7e5487:core.Destroy.Core", scope: null, file: !6, line: 13, type: !29, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !32)
|
|
|
-// CHECK:STDOUT: !29 = !DISubroutineType(types: !30)
|
|
|
-// CHECK:STDOUT: !30 = !{null, !31}
|
|
|
-// CHECK:STDOUT: !31 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
|
|
-// CHECK:STDOUT: !32 = !{!33}
|
|
|
-// CHECK:STDOUT: !33 = !DILocalVariable(arg: 1, scope: !28, type: !31)
|
|
|
-// CHECK:STDOUT: !34 = !DILocation(line: 13, column: 42, scope: !28)
|
|
|
-// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Op", linkageName: "_COp.bfd302cd235977c4:core.Destroy.Core", scope: null, file: !6, line: 13, type: !36, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !39)
|
|
|
-// CHECK:STDOUT: !36 = !DISubroutineType(types: !37)
|
|
|
-// CHECK:STDOUT: !37 = !{null, !38}
|
|
|
-// CHECK:STDOUT: !38 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64)
|
|
|
-// CHECK:STDOUT: !39 = !{!40}
|
|
|
-// CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !35, type: !38)
|
|
|
-// CHECK:STDOUT: !41 = !DILocation(line: 13, column: 42, scope: !35)
|
|
|
-// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "InitVectorLike", linkageName: "_CInitVectorLike.Main", scope: null, file: !6, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !5)
|
|
|
-// CHECK:STDOUT: !43 = !DILocation(line: 18, column: 3, scope: !42)
|
|
|
-// CHECK:STDOUT: !44 = !DILocation(line: 18, column: 28, scope: !42)
|
|
|
-// CHECK:STDOUT: !45 = !DILocation(line: 19, column: 3, scope: !42)
|
|
|
-// CHECK:STDOUT: !46 = !DILocation(line: 17, column: 1, scope: !42)
|
|
|
-// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "InitNontrivialDtor", linkageName: "_CInitNontrivialDtor.Main", scope: null, file: !6, line: 22, type: !22, spFlags: DISPFlagDefinition, unit: !5)
|
|
|
-// CHECK:STDOUT: !48 = !DILocation(line: 23, column: 3, scope: !47)
|
|
|
-// CHECK:STDOUT: !49 = !DILocation(line: 23, column: 58, scope: !47)
|
|
|
-// CHECK:STDOUT: !50 = !DILocation(line: 24, column: 3, scope: !47)
|
|
|
-// CHECK:STDOUT: !51 = !DILocation(line: 22, column: 1, scope: !47)
|
|
|
-// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "Op", linkageName: "_COp.3c5ceecfa63e1bfb:core.Destroy.Core", scope: null, file: !6, line: 23, type: !36, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !53)
|
|
|
+// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "InitDirectly", linkageName: "_CInitDirectly.Main", scope: null, file: !6, line: 12, type: !12, spFlags: DISPFlagDefinition, unit: !5)
|
|
|
+// CHECK:STDOUT: !12 = !DISubroutineType(types: !13)
|
|
|
+// CHECK:STDOUT: !13 = !{null}
|
|
|
+// CHECK:STDOUT: !14 = !DILocation(line: 13, column: 3, scope: !11)
|
|
|
+// CHECK:STDOUT: !15 = !DILocation(line: 13, column: 42, scope: !11)
|
|
|
+// CHECK:STDOUT: !16 = !DILocation(line: 14, column: 3, scope: !11)
|
|
|
+// CHECK:STDOUT: !17 = !DILocation(line: 12, column: 1, scope: !11)
|
|
|
+// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.7e389eab4a7e5487:core.Destroy.Core", scope: null, file: !6, line: 13, type: !19, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !22)
|
|
|
+// CHECK:STDOUT: !19 = !DISubroutineType(types: !20)
|
|
|
+// CHECK:STDOUT: !20 = !{null, !21}
|
|
|
+// CHECK:STDOUT: !21 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
|
|
+// CHECK:STDOUT: !22 = !{!23}
|
|
|
+// CHECK:STDOUT: !23 = !DILocalVariable(arg: 1, scope: !18, type: !21)
|
|
|
+// CHECK:STDOUT: !24 = !DILocation(line: 13, column: 42, scope: !18)
|
|
|
+// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp.bfd302cd235977c4:core.Destroy.Core", scope: null, file: !6, line: 13, type: !26, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !29)
|
|
|
+// CHECK:STDOUT: !26 = !DISubroutineType(types: !27)
|
|
|
+// CHECK:STDOUT: !27 = !{null, !28}
|
|
|
+// CHECK:STDOUT: !28 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64)
|
|
|
+// CHECK:STDOUT: !29 = !{!30}
|
|
|
+// CHECK:STDOUT: !30 = !DILocalVariable(arg: 1, scope: !25, type: !28)
|
|
|
+// CHECK:STDOUT: !31 = !DILocation(line: 13, column: 42, scope: !25)
|
|
|
+// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "InitVectorLike", linkageName: "_CInitVectorLike.Main", scope: null, file: !6, line: 17, type: !12, spFlags: DISPFlagDefinition, unit: !5)
|
|
|
+// CHECK:STDOUT: !33 = !DILocation(line: 18, column: 3, scope: !32)
|
|
|
+// CHECK:STDOUT: !34 = !DILocation(line: 18, column: 28, scope: !32)
|
|
|
+// CHECK:STDOUT: !35 = !DILocation(line: 19, column: 3, scope: !32)
|
|
|
+// CHECK:STDOUT: !36 = !DILocation(line: 17, column: 1, scope: !32)
|
|
|
+// CHECK:STDOUT: !37 = !{!38, !38, i64 0}
|
|
|
+// CHECK:STDOUT: !38 = !{!"p1 _ZTSSt16initializer_listIiE", !39, i64 0}
|
|
|
+// CHECK:STDOUT: !39 = !{!"any pointer", !9, i64 0}
|
|
|
+// CHECK:STDOUT: !40 = !{!41, !41, i64 0}
|
|
|
+// CHECK:STDOUT: !41 = !{!"p1 _ZTS11vector_like", !39, i64 0}
|
|
|
+// CHECK:STDOUT: !42 = !{i64 0, i64 8, !43, i64 8, i64 8, !43}
|
|
|
+// CHECK:STDOUT: !43 = !{!44, !44, i64 0}
|
|
|
+// CHECK:STDOUT: !44 = !{!"p1 int", !39, i64 0}
|
|
|
+// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "InitNontrivialDtor", linkageName: "_CInitNontrivialDtor.Main", scope: null, file: !6, line: 22, type: !12, spFlags: DISPFlagDefinition, unit: !5)
|
|
|
+// CHECK:STDOUT: !46 = !DILocation(line: 23, column: 3, scope: !45)
|
|
|
+// CHECK:STDOUT: !47 = !DILocation(line: 23, column: 58, scope: !45)
|
|
|
+// CHECK:STDOUT: !48 = !DILocation(line: 24, column: 3, scope: !45)
|
|
|
+// CHECK:STDOUT: !49 = !DILocation(line: 22, column: 1, scope: !45)
|
|
|
+// CHECK:STDOUT: !50 = !{!51, !51, i64 0}
|
|
|
+// CHECK:STDOUT: !51 = !{!"p1 _ZTS15nontrivial_dtor", !39, i64 0}
|
|
|
+// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "Op", linkageName: "_COp.3c5ceecfa63e1bfb:core.Destroy.Core", scope: null, file: !6, line: 23, type: !26, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !53)
|
|
|
// CHECK:STDOUT: !53 = !{!54}
|
|
|
-// CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !52, type: !38)
|
|
|
+// CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !52, type: !28)
|
|
|
// CHECK:STDOUT: !55 = !DILocation(line: 23, column: 58, scope: !52)
|
|
|
// CHECK:STDOUT: ; ModuleID = 'use_pointer_size.carbon'
|
|
|
// CHECK:STDOUT: source_filename = "use_pointer_size.carbon"
|
|
|
@@ -366,28 +367,84 @@ fn InitNontrivialDtor() {
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: %"class.std::initializer_list" = type { ptr, i64 }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: $_ZN11vector_likeC2ESt16initializer_listIiE = comdat any
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: $_ZN15nontrivial_dtorC2Ev = comdat any
|
|
|
-// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: $_ZN11vector_likeD2Ev = comdat any
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: $_ZN15nontrivial_dtorD2Ev = comdat any
|
|
|
// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: $_ZN11vector_likeC2ESt16initializer_listIiE = comdat any
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: $_ZN15nontrivial_dtorC2Ev = comdat any
|
|
|
+// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: @array = internal constant [3 x i32] [i32 1, i32 2, i32 3]
|
|
|
// CHECK:STDOUT: @array.loc13_50.15 = internal constant [3 x i32] [i32 1, i32 2, i32 3]
|
|
|
// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: declare void @_CWithinLifetime.Main()
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: ; Function Attrs: nounwind
|
|
|
+// CHECK:STDOUT: define void @_CInitDirectly.Main() #0 !dbg !11 {
|
|
|
+// CHECK:STDOUT: entry:
|
|
|
+// CHECK:STDOUT: %_.var = alloca [16 x i8], align 1, !dbg !14
|
|
|
+// CHECK:STDOUT: %.loc13_50.3.temp = alloca [3 x i32], align 4, !dbg !15
|
|
|
+// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !14
|
|
|
+// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc13_50.3.temp), !dbg !15
|
|
|
+// CHECK:STDOUT: %.loc13_50.4.array.index = getelementptr inbounds [3 x i32], ptr %.loc13_50.3.temp, i32 0, i64 0, !dbg !15
|
|
|
+// CHECK:STDOUT: %.loc13_50.7.array.index = getelementptr inbounds [3 x i32], ptr %.loc13_50.3.temp, i32 0, i64 1, !dbg !15
|
|
|
+// CHECK:STDOUT: %.loc13_50.10.array.index = getelementptr inbounds [3 x i32], ptr %.loc13_50.3.temp, i32 0, i64 2, !dbg !15
|
|
|
+// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.begin = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 0, !dbg !14
|
|
|
+// CHECK:STDOUT: store ptr @array.loc13_50.15, ptr %initializer_list.initializer_list.call.init_list.begin, align 8, !dbg !14
|
|
|
+// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.size = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 8, !dbg !14
|
|
|
+// CHECK:STDOUT: store i64 3, ptr %initializer_list.initializer_list.call.init_list.size, align 8, !dbg !14
|
|
|
+// CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !16
|
|
|
+// CHECK:STDOUT: call void @"_COp.bfd302cd235977c4:core.Destroy.Core"(ptr @array), !dbg !15
|
|
|
+// CHECK:STDOUT: ret void, !dbg !17
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: ; Function Attrs: nounwind
|
|
|
+// CHECK:STDOUT: define weak_odr void @"_COp.7e389eab4a7e5487:core.Destroy.Core"(ptr %self) #0 !dbg !18 {
|
|
|
+// CHECK:STDOUT: entry:
|
|
|
+// CHECK:STDOUT: ret void, !dbg !24
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: ; Function Attrs: nounwind
|
|
|
+// CHECK:STDOUT: define weak_odr void @"_COp.bfd302cd235977c4:core.Destroy.Core"(ptr %self) #0 !dbg !25 {
|
|
|
+// CHECK:STDOUT: entry:
|
|
|
+// CHECK:STDOUT: ret void, !dbg !31
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: ; Function Attrs: nounwind
|
|
|
+// CHECK:STDOUT: define void @_CInitVectorLike.Main() #0 !dbg !32 {
|
|
|
+// CHECK:STDOUT: entry:
|
|
|
+// CHECK:STDOUT: %_.var = alloca [1 x i8], align 1, !dbg !33
|
|
|
+// CHECK:STDOUT: %.loc18_36.2.temp = alloca [16 x i8], align 1, !dbg !34
|
|
|
+// CHECK:STDOUT: %.loc18_36.4.temp = alloca [3 x i32], align 4, !dbg !34
|
|
|
+// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !33
|
|
|
+// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_36.2.temp), !dbg !34
|
|
|
+// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_36.4.temp), !dbg !34
|
|
|
+// CHECK:STDOUT: %.loc18_36.5.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_36.4.temp, i32 0, i64 0, !dbg !34
|
|
|
+// CHECK:STDOUT: %.loc18_36.8.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_36.4.temp, i32 0, i64 1, !dbg !34
|
|
|
+// CHECK:STDOUT: %.loc18_36.11.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_36.4.temp, i32 0, i64 2, !dbg !34
|
|
|
+// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.begin = getelementptr inbounds nuw [16 x i8], ptr %.loc18_36.2.temp, i32 0, i32 0, !dbg !34
|
|
|
+// CHECK:STDOUT: store ptr @array.loc13_50.15, ptr %initializer_list.initializer_list.call.init_list.begin, align 8, !dbg !34
|
|
|
+// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.size = getelementptr inbounds nuw [16 x i8], ptr %.loc18_36.2.temp, i32 0, i32 8, !dbg !34
|
|
|
+// CHECK:STDOUT: store i64 3, ptr %initializer_list.initializer_list.call.init_list.size, align 8, !dbg !34
|
|
|
+// CHECK:STDOUT: call void @_ZN11vector_likeC1ESt16initializer_listIiE.carbon_thunk(ptr %.loc18_36.2.temp, ptr %_.var), !dbg !33
|
|
|
+// CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !35
|
|
|
+// CHECK:STDOUT: call void @"_COp.bfd302cd235977c4:core.Destroy.Core"(ptr @array), !dbg !34
|
|
|
+// CHECK:STDOUT: call void @_ZN11vector_likeD2Ev(ptr %_.var), !dbg !33
|
|
|
+// CHECK:STDOUT: ret void, !dbg !36
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable
|
|
|
-// CHECK:STDOUT: define dso_local void @_ZN11vector_likeC1ESt16initializer_listIiE.carbon_thunk(ptr noundef %list, ptr noundef %return) #0 {
|
|
|
+// CHECK:STDOUT: define internal void @_ZN11vector_likeC1ESt16initializer_listIiE.carbon_thunk(ptr noundef %list, ptr noundef %return) #1 {
|
|
|
// CHECK:STDOUT: entry:
|
|
|
// CHECK:STDOUT: %list.addr = alloca ptr, align 8
|
|
|
// CHECK:STDOUT: %return.addr = alloca ptr, align 8
|
|
|
// CHECK:STDOUT: %agg.tmp = alloca %"class.std::initializer_list", align 8
|
|
|
-// CHECK:STDOUT: store ptr %list, ptr %list.addr, align 8, !tbaa !11
|
|
|
-// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !14
|
|
|
-// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !14
|
|
|
-// CHECK:STDOUT: %1 = load ptr, ptr %list.addr, align 8, !tbaa !11
|
|
|
-// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %agg.tmp, ptr align 8 %1, i64 16, i1 false), !tbaa.struct !16
|
|
|
+// CHECK:STDOUT: store ptr %list, ptr %list.addr, align 8, !tbaa !37
|
|
|
+// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !40
|
|
|
+// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !40
|
|
|
+// CHECK:STDOUT: %1 = load ptr, ptr %list.addr, align 8, !tbaa !37
|
|
|
+// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %agg.tmp, ptr align 8 %1, i64 16, i1 false), !tbaa.struct !42
|
|
|
// CHECK:STDOUT: %2 = getelementptr inbounds nuw { ptr, i64 }, ptr %agg.tmp, i32 0, i32 0
|
|
|
// CHECK:STDOUT: %3 = load ptr, ptr %2, align 8
|
|
|
// CHECK:STDOUT: %4 = getelementptr inbounds nuw { ptr, i64 }, ptr %agg.tmp, i32 0, i32 1
|
|
|
@@ -396,155 +453,100 @@ fn InitNontrivialDtor() {
|
|
|
// CHECK:STDOUT: ret void
|
|
|
// CHECK:STDOUT: }
|
|
|
// 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) #1
|
|
|
-// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: ; Function Attrs: mustprogress nounwind uwtable
|
|
|
-// CHECK:STDOUT: define linkonce_odr dso_local void @_ZN11vector_likeC2ESt16initializer_listIiE(ptr noundef nonnull align 1 dereferenceable(1) %this, ptr %list.coerce0, i64 %list.coerce1) unnamed_addr #2 comdat align 2 {
|
|
|
+// CHECK:STDOUT: define linkonce_odr dso_local void @_ZN11vector_likeD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %this) unnamed_addr #2 comdat align 2 {
|
|
|
// CHECK:STDOUT: entry:
|
|
|
-// CHECK:STDOUT: %list = alloca %"class.std::initializer_list", align 8
|
|
|
// CHECK:STDOUT: %this.addr = alloca ptr, align 8
|
|
|
-// CHECK:STDOUT: %0 = getelementptr inbounds nuw { ptr, i64 }, ptr %list, i32 0, i32 0
|
|
|
-// CHECK:STDOUT: store ptr %list.coerce0, ptr %0, align 8
|
|
|
-// CHECK:STDOUT: %1 = getelementptr inbounds nuw { ptr, i64 }, ptr %list, i32 0, i32 1
|
|
|
-// CHECK:STDOUT: store i64 %list.coerce1, ptr %1, align 8
|
|
|
-// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !14
|
|
|
+// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !40
|
|
|
// CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8
|
|
|
// CHECK:STDOUT: ret void
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: ; Function Attrs: nounwind
|
|
|
+// CHECK:STDOUT: define void @_CInitNontrivialDtor.Main() #0 !dbg !47 {
|
|
|
+// CHECK:STDOUT: entry:
|
|
|
+// CHECK:STDOUT: %_.var = alloca [16 x i8], align 1, !dbg !48
|
|
|
+// CHECK:STDOUT: %.loc23_69.17.temp = alloca [3 x [1 x i8]], align 1, !dbg !49
|
|
|
+// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !48
|
|
|
+// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc23_69.17.temp), !dbg !49
|
|
|
+// CHECK:STDOUT: %.loc23_69.18.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.17.temp, i32 0, i64 0, !dbg !49
|
|
|
+// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple(ptr %.loc23_69.18.array.index), !dbg !49
|
|
|
+// CHECK:STDOUT: %.loc23_69.16.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.17.temp, i32 0, i64 1, !dbg !49
|
|
|
+// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple(ptr %.loc23_69.16.array.index), !dbg !49
|
|
|
+// CHECK:STDOUT: %.loc23_69.15.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.17.temp, i32 0, i64 2, !dbg !49
|
|
|
+// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple(ptr %.loc23_69.15.array.index), !dbg !49
|
|
|
+// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.begin = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 0, !dbg !48
|
|
|
+// CHECK:STDOUT: store ptr %.loc23_69.17.temp, ptr %initializer_list.initializer_list.call.init_list.begin, align 8, !dbg !48
|
|
|
+// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.size = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 8, !dbg !48
|
|
|
+// CHECK:STDOUT: store i64 3, ptr %initializer_list.initializer_list.call.init_list.size, align 8, !dbg !48
|
|
|
+// CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !50
|
|
|
+// CHECK:STDOUT: call void @"_COp.3c5ceecfa63e1bfb:core.Destroy.Core"(ptr %.loc23_69.17.temp), !dbg !49
|
|
|
+// CHECK:STDOUT: ret void, !dbg !51
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable
|
|
|
-// CHECK:STDOUT: define dso_local void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple(ptr noundef %return) #0 {
|
|
|
+// CHECK:STDOUT: define internal void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple(ptr noundef %return) #1 {
|
|
|
// CHECK:STDOUT: entry:
|
|
|
// CHECK:STDOUT: %return.addr = alloca ptr, align 8
|
|
|
-// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !21
|
|
|
-// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !21
|
|
|
+// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !52
|
|
|
+// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !52
|
|
|
// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %0)
|
|
|
// CHECK:STDOUT: ret void
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: ; Function Attrs: mustprogress nounwind uwtable
|
|
|
-// CHECK:STDOUT: define linkonce_odr dso_local void @_ZN15nontrivial_dtorC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %this) unnamed_addr #2 comdat align 2 {
|
|
|
+// CHECK:STDOUT: define linkonce_odr dso_local void @_ZN15nontrivial_dtorD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %this) unnamed_addr #2 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 !21
|
|
|
+// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !52
|
|
|
// CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8
|
|
|
// CHECK:STDOUT: ret void
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: declare void @_CWithinLifetime.Main()
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: ; Function Attrs: nounwind
|
|
|
-// CHECK:STDOUT: define void @_CInitDirectly.Main() #3 !dbg !23 {
|
|
|
-// CHECK:STDOUT: entry:
|
|
|
-// CHECK:STDOUT: %_.var = alloca [16 x i8], align 1, !dbg !26
|
|
|
-// CHECK:STDOUT: %.loc13_50.3.temp = alloca [3 x i32], align 4, !dbg !27
|
|
|
-// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !26
|
|
|
-// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc13_50.3.temp), !dbg !27
|
|
|
-// CHECK:STDOUT: %.loc13_50.4.array.index = getelementptr inbounds [3 x i32], ptr %.loc13_50.3.temp, i32 0, i64 0, !dbg !27
|
|
|
-// CHECK:STDOUT: %.loc13_50.7.array.index = getelementptr inbounds [3 x i32], ptr %.loc13_50.3.temp, i32 0, i64 1, !dbg !27
|
|
|
-// CHECK:STDOUT: %.loc13_50.10.array.index = getelementptr inbounds [3 x i32], ptr %.loc13_50.3.temp, i32 0, i64 2, !dbg !27
|
|
|
-// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.begin = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 0, !dbg !26
|
|
|
-// CHECK:STDOUT: store ptr @array.loc13_50.15, ptr %initializer_list.initializer_list.call.init_list.begin, align 8, !dbg !26
|
|
|
-// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.size = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 8, !dbg !26
|
|
|
-// CHECK:STDOUT: store i64 3, ptr %initializer_list.initializer_list.call.init_list.size, align 8, !dbg !26
|
|
|
-// CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !28
|
|
|
-// CHECK:STDOUT: call void @"_COp.bfd302cd235977c4:core.Destroy.Core"(ptr @array), !dbg !27
|
|
|
-// CHECK:STDOUT: ret void, !dbg !29
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: ; Function Attrs: nounwind
|
|
|
-// CHECK:STDOUT: define weak_odr void @"_COp.7e389eab4a7e5487:core.Destroy.Core"(ptr %self) #3 !dbg !30 {
|
|
|
+// CHECK:STDOUT: define weak_odr void @"_COp.3c5ceecfa63e1bfb:core.Destroy.Core"(ptr %self) #0 !dbg !54 {
|
|
|
// CHECK:STDOUT: entry:
|
|
|
-// CHECK:STDOUT: ret void, !dbg !36
|
|
|
+// CHECK:STDOUT: ret void, !dbg !57
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: ; Function Attrs: nounwind
|
|
|
-// CHECK:STDOUT: define weak_odr void @"_COp.bfd302cd235977c4:core.Destroy.Core"(ptr %self) #3 !dbg !37 {
|
|
|
-// CHECK:STDOUT: entry:
|
|
|
-// CHECK:STDOUT: ret void, !dbg !43
|
|
|
-// 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: ; Function Attrs: nounwind
|
|
|
-// CHECK:STDOUT: define void @_CInitVectorLike.Main() #3 !dbg !44 {
|
|
|
-// CHECK:STDOUT: entry:
|
|
|
-// CHECK:STDOUT: %_.var = alloca [1 x i8], align 1, !dbg !45
|
|
|
-// CHECK:STDOUT: %.loc18_36.2.temp = alloca [16 x i8], align 1, !dbg !46
|
|
|
-// CHECK:STDOUT: %.loc18_36.4.temp = alloca [3 x i32], align 4, !dbg !46
|
|
|
-// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !45
|
|
|
-// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_36.2.temp), !dbg !46
|
|
|
-// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_36.4.temp), !dbg !46
|
|
|
-// CHECK:STDOUT: %.loc18_36.5.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_36.4.temp, i32 0, i64 0, !dbg !46
|
|
|
-// CHECK:STDOUT: %.loc18_36.8.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_36.4.temp, i32 0, i64 1, !dbg !46
|
|
|
-// CHECK:STDOUT: %.loc18_36.11.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_36.4.temp, i32 0, i64 2, !dbg !46
|
|
|
-// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.begin = getelementptr inbounds nuw [16 x i8], ptr %.loc18_36.2.temp, i32 0, i32 0, !dbg !46
|
|
|
-// CHECK:STDOUT: store ptr @array.loc13_50.15, ptr %initializer_list.initializer_list.call.init_list.begin, align 8, !dbg !46
|
|
|
-// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.size = getelementptr inbounds nuw [16 x i8], ptr %.loc18_36.2.temp, i32 0, i32 8, !dbg !46
|
|
|
-// CHECK:STDOUT: store i64 3, ptr %initializer_list.initializer_list.call.init_list.size, align 8, !dbg !46
|
|
|
-// CHECK:STDOUT: call void @_ZN11vector_likeC1ESt16initializer_listIiE.carbon_thunk(ptr %.loc18_36.2.temp, ptr %_.var), !dbg !45
|
|
|
-// CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !47
|
|
|
-// CHECK:STDOUT: call void @"_COp.bfd302cd235977c4:core.Destroy.Core"(ptr @array), !dbg !46
|
|
|
-// CHECK:STDOUT: call void @_ZN11vector_likeD2Ev(ptr %_.var), !dbg !45
|
|
|
-// CHECK:STDOUT: ret void, !dbg !48
|
|
|
-// 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) #4
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: ; Function Attrs: mustprogress nounwind uwtable
|
|
|
-// CHECK:STDOUT: define linkonce_odr dso_local void @_ZN11vector_likeD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %this) unnamed_addr #2 comdat align 2 {
|
|
|
+// CHECK:STDOUT: define linkonce_odr dso_local void @_ZN11vector_likeC2ESt16initializer_listIiE(ptr noundef nonnull align 1 dereferenceable(1) %this, ptr %list.coerce0, i64 %list.coerce1) unnamed_addr #2 comdat align 2 {
|
|
|
// CHECK:STDOUT: entry:
|
|
|
+// CHECK:STDOUT: %list = alloca %"class.std::initializer_list", align 8
|
|
|
// CHECK:STDOUT: %this.addr = alloca ptr, align 8
|
|
|
-// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !14
|
|
|
+// CHECK:STDOUT: %0 = getelementptr inbounds nuw { ptr, i64 }, ptr %list, i32 0, i32 0
|
|
|
+// CHECK:STDOUT: store ptr %list.coerce0, ptr %0, align 8
|
|
|
+// CHECK:STDOUT: %1 = getelementptr inbounds nuw { ptr, i64 }, ptr %list, i32 0, i32 1
|
|
|
+// CHECK:STDOUT: store i64 %list.coerce1, ptr %1, align 8
|
|
|
+// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !40
|
|
|
// CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8
|
|
|
// CHECK:STDOUT: ret void
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: ; Function Attrs: nounwind
|
|
|
-// CHECK:STDOUT: define void @_CInitNontrivialDtor.Main() #3 !dbg !49 {
|
|
|
-// CHECK:STDOUT: entry:
|
|
|
-// CHECK:STDOUT: %_.var = alloca [16 x i8], align 1, !dbg !50
|
|
|
-// CHECK:STDOUT: %.loc23_69.17.temp = alloca [3 x [1 x i8]], align 1, !dbg !51
|
|
|
-// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !50
|
|
|
-// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc23_69.17.temp), !dbg !51
|
|
|
-// CHECK:STDOUT: %.loc23_69.18.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.17.temp, i32 0, i64 0, !dbg !51
|
|
|
-// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple(ptr %.loc23_69.18.array.index), !dbg !51
|
|
|
-// CHECK:STDOUT: %.loc23_69.16.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.17.temp, i32 0, i64 1, !dbg !51
|
|
|
-// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple(ptr %.loc23_69.16.array.index), !dbg !51
|
|
|
-// CHECK:STDOUT: %.loc23_69.15.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.17.temp, i32 0, i64 2, !dbg !51
|
|
|
-// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple(ptr %.loc23_69.15.array.index), !dbg !51
|
|
|
-// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.begin = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 0, !dbg !50
|
|
|
-// CHECK:STDOUT: store ptr %.loc23_69.17.temp, ptr %initializer_list.initializer_list.call.init_list.begin, align 8, !dbg !50
|
|
|
-// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.size = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 8, !dbg !50
|
|
|
-// CHECK:STDOUT: store i64 3, ptr %initializer_list.initializer_list.call.init_list.size, align 8, !dbg !50
|
|
|
-// CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !52
|
|
|
-// CHECK:STDOUT: call void @"_COp.3c5ceecfa63e1bfb:core.Destroy.Core"(ptr %.loc23_69.17.temp), !dbg !51
|
|
|
-// CHECK:STDOUT: ret void, !dbg !53
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: ; Function Attrs: mustprogress nounwind uwtable
|
|
|
-// CHECK:STDOUT: define linkonce_odr dso_local void @_ZN15nontrivial_dtorD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %this) unnamed_addr #2 comdat align 2 {
|
|
|
+// CHECK:STDOUT: define linkonce_odr dso_local void @_ZN15nontrivial_dtorC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %this) unnamed_addr #2 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 !21
|
|
|
+// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !52
|
|
|
// CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8
|
|
|
// CHECK:STDOUT: ret void
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: ; Function Attrs: nounwind
|
|
|
-// CHECK:STDOUT: define weak_odr void @"_COp.3c5ceecfa63e1bfb:core.Destroy.Core"(ptr %self) #3 !dbg !54 {
|
|
|
-// CHECK:STDOUT: entry:
|
|
|
-// CHECK:STDOUT: ret void, !dbg !57
|
|
|
-// 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: ; uselistorder directives
|
|
|
+// CHECK:STDOUT: uselistorder ptr @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple, { 2, 1, 0 }
|
|
|
// CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 6, 5, 4, 3, 2, 1, 0 }
|
|
|
// 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
|
|
|
+// CHECK:STDOUT: attributes #0 = { nounwind }
|
|
|
+// CHECK:STDOUT: attributes #1 = { 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 #2 = { 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 #3 = { nounwind }
|
|
|
-// CHECK:STDOUT: attributes #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
|
|
|
+// CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
|
|
|
+// CHECK:STDOUT: attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4}
|
|
|
// CHECK:STDOUT: !llvm.dbg.cu = !{!5}
|
|
|
@@ -561,50 +563,50 @@ fn InitNontrivialDtor() {
|
|
|
// CHECK:STDOUT: !8 = !{!"int", !9, i64 0}
|
|
|
// CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0}
|
|
|
// CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"}
|
|
|
-// CHECK:STDOUT: !11 = !{!12, !12, i64 0}
|
|
|
-// CHECK:STDOUT: !12 = !{!"p1 _ZTSSt16initializer_listIiE", !13, i64 0}
|
|
|
-// CHECK:STDOUT: !13 = !{!"any pointer", !9, i64 0}
|
|
|
-// CHECK:STDOUT: !14 = !{!15, !15, i64 0}
|
|
|
-// CHECK:STDOUT: !15 = !{!"p1 _ZTS11vector_like", !13, i64 0}
|
|
|
-// CHECK:STDOUT: !16 = !{i64 0, i64 8, !17, i64 8, i64 8, !19}
|
|
|
-// CHECK:STDOUT: !17 = !{!18, !18, i64 0}
|
|
|
-// CHECK:STDOUT: !18 = !{!"p1 int", !13, i64 0}
|
|
|
-// CHECK:STDOUT: !19 = !{!20, !20, i64 0}
|
|
|
-// CHECK:STDOUT: !20 = !{!"long", !9, i64 0}
|
|
|
-// CHECK:STDOUT: !21 = !{!22, !22, i64 0}
|
|
|
-// CHECK:STDOUT: !22 = !{!"p1 _ZTS15nontrivial_dtor", !13, i64 0}
|
|
|
-// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "InitDirectly", linkageName: "_CInitDirectly.Main", scope: null, file: !6, line: 12, type: !24, spFlags: DISPFlagDefinition, unit: !5)
|
|
|
-// CHECK:STDOUT: !24 = !DISubroutineType(types: !25)
|
|
|
-// CHECK:STDOUT: !25 = !{null}
|
|
|
-// CHECK:STDOUT: !26 = !DILocation(line: 13, column: 3, scope: !23)
|
|
|
-// CHECK:STDOUT: !27 = !DILocation(line: 13, column: 42, scope: !23)
|
|
|
-// CHECK:STDOUT: !28 = !DILocation(line: 14, column: 3, scope: !23)
|
|
|
-// CHECK:STDOUT: !29 = !DILocation(line: 12, column: 1, scope: !23)
|
|
|
-// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "Op", linkageName: "_COp.7e389eab4a7e5487:core.Destroy.Core", scope: null, file: !6, line: 13, type: !31, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !34)
|
|
|
-// CHECK:STDOUT: !31 = !DISubroutineType(types: !32)
|
|
|
-// CHECK:STDOUT: !32 = !{null, !33}
|
|
|
-// CHECK:STDOUT: !33 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
|
|
-// CHECK:STDOUT: !34 = !{!35}
|
|
|
-// CHECK:STDOUT: !35 = !DILocalVariable(arg: 1, scope: !30, type: !33)
|
|
|
-// CHECK:STDOUT: !36 = !DILocation(line: 13, column: 42, scope: !30)
|
|
|
-// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "Op", linkageName: "_COp.bfd302cd235977c4:core.Destroy.Core", scope: null, file: !6, line: 13, type: !38, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !41)
|
|
|
-// CHECK:STDOUT: !38 = !DISubroutineType(types: !39)
|
|
|
-// CHECK:STDOUT: !39 = !{null, !40}
|
|
|
-// CHECK:STDOUT: !40 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64)
|
|
|
-// CHECK:STDOUT: !41 = !{!42}
|
|
|
-// CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !37, type: !40)
|
|
|
-// CHECK:STDOUT: !43 = !DILocation(line: 13, column: 42, scope: !37)
|
|
|
-// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "InitVectorLike", linkageName: "_CInitVectorLike.Main", scope: null, file: !6, line: 17, type: !24, spFlags: DISPFlagDefinition, unit: !5)
|
|
|
-// CHECK:STDOUT: !45 = !DILocation(line: 18, column: 3, scope: !44)
|
|
|
-// CHECK:STDOUT: !46 = !DILocation(line: 18, column: 28, scope: !44)
|
|
|
-// CHECK:STDOUT: !47 = !DILocation(line: 19, column: 3, scope: !44)
|
|
|
-// CHECK:STDOUT: !48 = !DILocation(line: 17, column: 1, scope: !44)
|
|
|
-// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "InitNontrivialDtor", linkageName: "_CInitNontrivialDtor.Main", scope: null, file: !6, line: 22, type: !24, spFlags: DISPFlagDefinition, unit: !5)
|
|
|
-// CHECK:STDOUT: !50 = !DILocation(line: 23, column: 3, scope: !49)
|
|
|
-// CHECK:STDOUT: !51 = !DILocation(line: 23, column: 58, scope: !49)
|
|
|
-// CHECK:STDOUT: !52 = !DILocation(line: 24, column: 3, scope: !49)
|
|
|
-// CHECK:STDOUT: !53 = !DILocation(line: 22, column: 1, scope: !49)
|
|
|
-// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "Op", linkageName: "_COp.3c5ceecfa63e1bfb:core.Destroy.Core", scope: null, file: !6, line: 23, type: !38, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !55)
|
|
|
+// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "InitDirectly", linkageName: "_CInitDirectly.Main", scope: null, file: !6, line: 12, type: !12, spFlags: DISPFlagDefinition, unit: !5)
|
|
|
+// CHECK:STDOUT: !12 = !DISubroutineType(types: !13)
|
|
|
+// CHECK:STDOUT: !13 = !{null}
|
|
|
+// CHECK:STDOUT: !14 = !DILocation(line: 13, column: 3, scope: !11)
|
|
|
+// CHECK:STDOUT: !15 = !DILocation(line: 13, column: 42, scope: !11)
|
|
|
+// CHECK:STDOUT: !16 = !DILocation(line: 14, column: 3, scope: !11)
|
|
|
+// CHECK:STDOUT: !17 = !DILocation(line: 12, column: 1, scope: !11)
|
|
|
+// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.7e389eab4a7e5487:core.Destroy.Core", scope: null, file: !6, line: 13, type: !19, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !22)
|
|
|
+// CHECK:STDOUT: !19 = !DISubroutineType(types: !20)
|
|
|
+// CHECK:STDOUT: !20 = !{null, !21}
|
|
|
+// CHECK:STDOUT: !21 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
|
|
+// CHECK:STDOUT: !22 = !{!23}
|
|
|
+// CHECK:STDOUT: !23 = !DILocalVariable(arg: 1, scope: !18, type: !21)
|
|
|
+// CHECK:STDOUT: !24 = !DILocation(line: 13, column: 42, scope: !18)
|
|
|
+// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp.bfd302cd235977c4:core.Destroy.Core", scope: null, file: !6, line: 13, type: !26, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !29)
|
|
|
+// CHECK:STDOUT: !26 = !DISubroutineType(types: !27)
|
|
|
+// CHECK:STDOUT: !27 = !{null, !28}
|
|
|
+// CHECK:STDOUT: !28 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64)
|
|
|
+// CHECK:STDOUT: !29 = !{!30}
|
|
|
+// CHECK:STDOUT: !30 = !DILocalVariable(arg: 1, scope: !25, type: !28)
|
|
|
+// CHECK:STDOUT: !31 = !DILocation(line: 13, column: 42, scope: !25)
|
|
|
+// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "InitVectorLike", linkageName: "_CInitVectorLike.Main", scope: null, file: !6, line: 17, type: !12, spFlags: DISPFlagDefinition, unit: !5)
|
|
|
+// CHECK:STDOUT: !33 = !DILocation(line: 18, column: 3, scope: !32)
|
|
|
+// CHECK:STDOUT: !34 = !DILocation(line: 18, column: 28, scope: !32)
|
|
|
+// CHECK:STDOUT: !35 = !DILocation(line: 19, column: 3, scope: !32)
|
|
|
+// CHECK:STDOUT: !36 = !DILocation(line: 17, column: 1, scope: !32)
|
|
|
+// CHECK:STDOUT: !37 = !{!38, !38, i64 0}
|
|
|
+// CHECK:STDOUT: !38 = !{!"p1 _ZTSSt16initializer_listIiE", !39, i64 0}
|
|
|
+// CHECK:STDOUT: !39 = !{!"any pointer", !9, i64 0}
|
|
|
+// CHECK:STDOUT: !40 = !{!41, !41, i64 0}
|
|
|
+// CHECK:STDOUT: !41 = !{!"p1 _ZTS11vector_like", !39, i64 0}
|
|
|
+// CHECK:STDOUT: !42 = !{i64 0, i64 8, !43, i64 8, i64 8, !45}
|
|
|
+// CHECK:STDOUT: !43 = !{!44, !44, i64 0}
|
|
|
+// CHECK:STDOUT: !44 = !{!"p1 int", !39, i64 0}
|
|
|
+// CHECK:STDOUT: !45 = !{!46, !46, i64 0}
|
|
|
+// CHECK:STDOUT: !46 = !{!"long", !9, i64 0}
|
|
|
+// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "InitNontrivialDtor", linkageName: "_CInitNontrivialDtor.Main", scope: null, file: !6, line: 22, type: !12, spFlags: DISPFlagDefinition, unit: !5)
|
|
|
+// CHECK:STDOUT: !48 = !DILocation(line: 23, column: 3, scope: !47)
|
|
|
+// CHECK:STDOUT: !49 = !DILocation(line: 23, column: 58, scope: !47)
|
|
|
+// CHECK:STDOUT: !50 = !DILocation(line: 24, column: 3, scope: !47)
|
|
|
+// CHECK:STDOUT: !51 = !DILocation(line: 22, column: 1, scope: !47)
|
|
|
+// CHECK:STDOUT: !52 = !{!53, !53, i64 0}
|
|
|
+// CHECK:STDOUT: !53 = !{!"p1 _ZTS15nontrivial_dtor", !39, i64 0}
|
|
|
+// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "Op", linkageName: "_COp.3c5ceecfa63e1bfb:core.Destroy.Core", scope: null, file: !6, line: 23, type: !26, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !55)
|
|
|
// CHECK:STDOUT: !55 = !{!56}
|
|
|
-// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !54, type: !40)
|
|
|
+// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !54, type: !28)
|
|
|
// CHECK:STDOUT: !57 = !DILocation(line: 23, column: 58, scope: !54)
|