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:
Richard Smith authored and GitHub committed 2025-12-23 05:30:29 +00:00
1 parent 29018f38a6
commit 531d063596
8 files changed
+81 -47

No files matched your search

@@ -807,7 +807,7 @@ fn Call() {
// CHECK:STDOUT:
// CHECK:STDOUT: fn @DestroyOp(%self.param: %X) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @X.cpp_destructor(%self.param: %X);
// CHECK:STDOUT: fn @X.cpp_destructor(%self.param: %X) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_call_too_few_args.carbon
// CHECK:STDOUT: