[PATCH] D74166: [AIX][Frontend] Static init implementation for AIX considering no priority
Jason Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 18 07:42:08 PDT 2020
jasonliu added inline comments.
================
Comment at: clang/lib/CodeGen/CGDeclCXX.cpp:345
+ // rarely.
+ Weights = nullptr;
+ } else if (Kind == GuardKind::VariableGuard && !D->isLocalVarDecl()) {
----------------
Do we need to change/complicate the interface for this function, just to do a call to Builder.CreateCondBr()?
Could we call that function directly from where it's needed?
================
Comment at: clang/lib/CodeGen/CGDeclCXX.cpp:648
- // Include the filename in the symbol name. Including "sub_" matches gcc and
- // makes sure these symbols appear lexicographically behind the symbols with
- // priority emitted above.
- SmallString<128> FileName = llvm::sys::path::filename(getModule().getName());
- if (FileName.empty())
- FileName = "<null>";
+ // Create our global initialization function.
+ if (UseSinitAndSterm && CXXGlobalInits.empty())
----------------
This comment does not apply well on top of this early return for some platform. I think you could move it to current line 665?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74166/new/
https://reviews.llvm.org/D74166
More information about the cfe-commits
mailing list