mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
When importing a trivial destructor from C++, produce a no_op builtin. (#6531)
This avoids us trying to produce a reference to the C++ destructor, which Clang won't emit because it believes it's unnecessary. This previously led to link errors. Fixe #6502.
This commit is contained in:
@@ -114,12 +114,9 @@ fn AccessD(d: Cpp.D) -> i32 {
|
||||
// CHECK:STDOUT: %_.var = alloca [40 x i8], align 1, !dbg !10
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !10
|
||||
// CHECK:STDOUT: call void @_ZN1DC1Ev.carbon_thunk(ptr %_.var), !dbg !11
|
||||
// CHECK:STDOUT: call void @_ZN1DD1Ev(ptr %_.var), !dbg !10
|
||||
// CHECK:STDOUT: ret void, !dbg !12
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: declare void @_ZN1DD1Ev(ptr)
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define i32 @_CAccessD.Main(ptr %d) #0 !dbg !13 {
|
||||
// CHECK:STDOUT: entry:
|
||||
|
||||
Reference in New Issue
Block a user