diff options
author | Xiangling Liao <Xiangling.Liao@ibm.com> | 2020-07-15 16:12:22 -0400 |
---|---|---|
committer | Xiangling Liao <Xiangling.Liao@ibm.com> | 2020-08-10 10:10:49 -0400 |
commit | 6ef801aa6bc01fc49a8e83ddb217470b5e2337dd (patch) | |
tree | be3f8c4f89ebcc62ac6cc51bef43782dc3a563f2 /clang/lib/CodeGen/CodeGenModule.h | |
parent | 07e673a02bb163a70b2b5eff8231578646a20120 (diff) | |
download | llvm-6ef801aa6bc01fc49a8e83ddb217470b5e2337dd.zip llvm-6ef801aa6bc01fc49a8e83ddb217470b5e2337dd.tar.gz llvm-6ef801aa6bc01fc49a8e83ddb217470b5e2337dd.tar.bz2 |
[AIX] Static init frontend recovery and backend support
On the frontend side, this patch recovers AIX static init implementation to
use the linkage type and function names Clang chooses for sinit related function.
On the backend side, this patch sets correct linkage and function names on aliases
created for sinit/sterm functions.
Differential Revision: https://reviews.llvm.org/D84534
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index a6c4a1f..19085b5 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/lib/CodeGen/CodeGenModule.h @@ -396,10 +396,6 @@ private: /// emitted when the translation unit is complete. CtorList GlobalDtors; - /// A unique trailing identifier as a part of sinit/sterm function when - /// UseSinitAndSterm of CXXABI is set as true. - std::string GlobalUniqueModuleId; - /// An ordered map of canonical GlobalDecls to their mangled names. llvm::MapVector<GlobalDecl, StringRef> MangledDeclNames; llvm::StringMap<GlobalDecl, llvm::BumpPtrAllocator> Manglings; @@ -819,8 +815,7 @@ public: llvm::Function *CreateGlobalInitOrCleanUpFunction( llvm::FunctionType *ty, const Twine &name, const CGFunctionInfo &FI, - SourceLocation Loc = SourceLocation(), bool TLS = false, - bool IsExternalLinkage = false); + SourceLocation Loc = SourceLocation(), bool TLS = false); /// Return the AST address space of the underlying global variable for D, as /// determined by its declaration. Normally this is the same as the address @@ -1059,6 +1054,12 @@ public: DtorFn.getCallee(), nullptr); } + /// Add an sterm finalizer to its own llvm.global_dtors entry. + void AddCXXStermFinalizerToGlobalDtor(llvm::Function *StermFinalizer, + int Priority) { + AddGlobalDtor(StermFinalizer, Priority); + } + /// Create or return a runtime function declaration with the specified type /// and name. If \p AssumeConvergent is true, the call will have the /// convergent attribute added. |