This is an archive of the discontinued LLVM Phabricator instance.

[C++20] [Modules] Don't generate strong function of a partition in importing modules
ClosedPublic

Authored by ChuanqiXu on Mar 8 2022, 9:48 PM.

Details

Summary

This solves the multiple defintiion issue https://github.com/llvm/llvm-project/issues/54269.

I think the cause of the bug might be an oversight. We just forget to edit this when implementing partitions. And it should be a good fix.

Diff Detail

Event Timeline

ChuanqiXu created this revision.Mar 8 2022, 9:48 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 8 2022, 9:48 PM
Herald added a subscriber: dexonsmith. · View Herald Transcript
ChuanqiXu requested review of this revision.Mar 8 2022, 9:48 PM
ChuanqiXu added a subscriber: Restricted Project.
iains added a comment.Mar 8 2022, 11:42 PM

I think you need to extend the test case (and possibly the code) to handle an implementation partition as well, where the module is both interface and implementation.

ChuanqiXu updated this revision to Diff 414022.Mar 9 2022, 12:14 AM
ChuanqiXu set the repository for this revision to rG LLVM Github Monorepo.

Address comments

I think you need to extend the test case (and possibly the code) to handle an implementation partition as well, where the module is both interface and implementation.

Yeah, this is the intention of partb (maybe I took a typo).


Also, I found all the CodeGen tests patch would better to depend D118352 otherwise @urnathan might need to rebase again or we need to unnecessary rebase.

iains added a comment.Mar 9 2022, 12:23 AM

thanks, this looks OK to me, but I would leave some time for other comments.

urnathan resigned from this revision.Mar 9 2022, 10:42 AM
iains added a comment.Mar 19 2022, 5:28 AM

it looks like the test case is failing everywhere - perhaps as a result of changes in the mangling scheme?

it looks like the test case is failing everywhere - perhaps as a result of changes in the mangling scheme?

Oh, yeah... let me try to continue the work in mangling scheme. I feel it is important otherwise it is not so good to demangle.

iains added a comment.Mar 30 2022, 8:58 AM

it looks like the first part of the C++20 mangling was just landed, so perhaps you can revisit this?

ChuanqiXu updated this revision to Diff 419603.Mar 31 2022, 7:16 PM

Specify itanium_abi_triple to make CI on windows passes.

@iains now it passes the CI!

iains accepted this revision.Mar 31 2022, 11:29 PM

LGTM, thanks.

This revision is now accepted and ready to land.Mar 31 2022, 11:29 PM