[AIX][Frontend] Static init implementation for AIX considering no priority
authorXiangling Liao <Xiangling.Liao@ibm.com>
Wed, 27 May 2020 21:04:43 +0000 (17:04 -0400)
committerXiangling Liao <Xiangling.Liao@ibm.com>
Fri, 19 Jun 2020 12:27:07 +0000 (08:27 -0400)
commit22337bfe7d87f9bf2b072ec7fe9165f7b9e2d793
treebb9855b1a44d35e19531f9f9072c6ad288ee7d89
parentc3b4486a57f6105bd5d96ec2e736f567aa4a0e35
[AIX][Frontend] Static init implementation for AIX considering no priority

1. Provides no piroirity supoort && disables three priority related
   attributes: init_priority, ctor attr, dtor attr;
2. '-qunique' in XL compiler equivalent behavior of emitting sinit
    and sterm functions name using getUniqueModuleId() util function
    in LLVM (currently no support for InternalLinkage and WeakODRLinkage
    symbols);
3. Add testcases to emit IR sample with __sinit80000000, __dtor, and
    __sterm80000000;
4. Temporarily side-steps the need to implement the functionality of
   llvm.global_ctors and llvm.global_dtors arrays. The uses of that
   functionality in this patch (with respect to the name of the functions
   involved) are not representative of how the functionality will be used
   once implemented.

Differential Revision: https://reviews.llvm.org/D74166
16 files changed:
clang/include/clang/AST/Mangle.h
clang/lib/AST/ItaniumMangle.cpp
clang/lib/CodeGen/CGCXXABI.h
clang/lib/CodeGen/CGDeclCXX.cpp
clang/lib/CodeGen/CGOpenMPRuntime.cpp
clang/lib/CodeGen/CodeGenFunction.h
clang/lib/CodeGen/CodeGenModule.cpp
clang/lib/CodeGen/CodeGenModule.h
clang/lib/CodeGen/ItaniumCXXABI.cpp
clang/lib/CodeGen/MicrosoftCXXABI.cpp
clang/lib/Sema/SemaDeclAttr.cpp
clang/test/CodeGen/aix-constructor-attribute.cpp [new file with mode: 0644]
clang/test/CodeGen/aix-destructor-attribute.cpp [new file with mode: 0644]
clang/test/CodeGen/aix-init-priority-attribute.cpp [new file with mode: 0644]
clang/test/CodeGen/static-init.cpp [deleted file]
clang/test/CodeGenCXX/aix-static-init.cpp [new file with mode: 0644]