This is an archive of the discontinued LLVM Phabricator instance.

[CUDA/HIP] Remove argument from module ctor/dtor signatures
ClosedPublic

Authored by Hahnfeld on Apr 8 2022, 1:58 AM.

Details

Summary

In theory, constructors can take arguments when called via .init_array
where at least glibc passes in (argc, argv, envp). This isn't used in
the generated code and if it was, the first argument should be an
integer, not a pointer. For destructors registered via atexit, the
function should never take an argument.

Diff Detail

Event Timeline

Hahnfeld created this revision.Apr 8 2022, 1:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 8 2022, 1:58 AM
Hahnfeld requested review of this revision.Apr 8 2022, 1:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 8 2022, 1:58 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
tra accepted this revision.Apr 8 2022, 11:23 AM
This revision is now accepted and ready to land.Apr 8 2022, 11:23 AM
yaxunl accepted this revision.Apr 8 2022, 12:16 PM

LGTM. Thanks.