This is an archive of the discontinued LLVM Phabricator instance.

[AIX] Support init priority attribute
ClosedPublic

Authored by Xiangling_L on Mar 24 2021, 12:10 PM.

Diff Detail

Event Timeline

Xiangling_L created this revision.Mar 24 2021, 12:10 PM
Xiangling_L requested review of this revision.Mar 24 2021, 12:10 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 24 2021, 12:10 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
aaron.ballman added inline comments.Mar 25 2021, 6:36 AM
clang/lib/CodeGen/CGDeclCXX.cpp
574

This isn't quite true -- it's enforced by sema for user code, but not for code that identifies itself as a system header. I see that this is existing code that's moved around a bit, but we may want to add an assertion here just in case.

Xiangling_L marked an inline comment as done.

Add assertion to make sure we have correct priority value in range;

jasonliu accepted this revision.Apr 7 2021, 3:55 PM

LGTM.

clang/lib/CodeGen/CGDeclCXX.cpp
663

Just noting that this trunk of code have very similar logic counter part in EmitCXXGlobalInitFunc. It seems there is no easy way to common them up given the current way of implementing it. It may require a non-trivial amount of refactoring for us to common up the similar logic between init and cleanup.

This revision is now accepted and ready to land.Apr 7 2021, 3:55 PM
Xiangling_L marked an inline comment as done.Apr 8 2021, 7:03 AM
Xiangling_L added inline comments.
clang/lib/CodeGen/CGDeclCXX.cpp
663

Yes, I thought about this as well but it looks if we'd like to common it up, we may need to create some template function.

This revision was automatically updated to reflect the committed changes.
Xiangling_L marked an inline comment as done.