This is an archive of the discontinued LLVM Phabricator instance.

[clang-repl] Support destructors of global objects.

Authored by sunho on Jun 25 2022, 12:04 PM.



Supports destructors of global objects by properly calling jitdylib deinitialize which calls the global dtors of ir modules.

This supersedes There was an issue when calling deinitialize on windows but it got fixed by

Diff Detail

Event Timeline

sunho created this revision.Jun 25 2022, 12:04 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 25 2022, 12:04 PM
sunho requested review of this revision.Jun 25 2022, 12:04 PM
sunho added a reviewer: v.g.vassilev.
sunho set the repository for this revision to rG LLVM Github Monorepo.Jun 25 2022, 12:18 PM
sunho added projects: Restricted Project, Restricted Project.
v.g.vassilev accepted this revision.Jun 25 2022, 12:37 PM

LGTM, modulo the comment.


Can you document this function?

This revision is now accepted and ready to land.Jun 25 2022, 12:37 PM
sunho updated this revision to Diff 440047.Jun 26 2022, 1:21 AM
This revision was automatically updated to reflect the committed changes.
sunho added a comment.Jun 26 2022, 6:11 AM

This seems to be breaking builds in ppc bots. Invastigating right now.

Hahnfeld added inline comments.

I think it would be better to add new test cases instead of extending this ever-growing file. And it might also be a good idea to split off some of the previous additions into separate test cases that exercise specific parts of the interpreter infrastructure (D126781 and D123674).

sunho added inline comments.Jun 30 2022, 11:52 AM

Got it. I will address your comment when relanding the patch after fixing ppc failure.