[libcxx-commits] [PATCH] D126738: [libc++][NFC] Inline the definition of ~basic_ios()

Alan Zhao via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jun 6 09:46:16 PDT 2022


ayzhao added a comment.

In D126738#3560693 <https://reviews.llvm.org/D126738#3560693>, @ayzhao wrote:

> In D126738#3557017 <https://reviews.llvm.org/D126738#3557017>, @philnik wrote:
>
>>> I spoke with cjdb@ offline and it seems that we can maintain ABI compatibility by defining an empty destructor (i.e. `~basic_ios() {}`) instead of using `= default`: https://godbolt.org/z/r73v1oE6n. WDYT?
>>
>> The problem isn't the triviality of `basic_ios`. The problem is that there isn't a key function anymore, so the vtable and destructor aren't emitted in the dylib anymore.
>
> Apologies for the dumb question, but could we resolve the issue by moving the definition of the destructor to `ios.cpp`? The destructor would still be a key function, and this should resolve the ODR issue.

NVM, I just realized that this isn't possible because of the template parameters.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126738/new/

https://reviews.llvm.org/D126738



More information about the libcxx-commits mailing list