aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorXiangling Liao <Xiangling.Liao@ibm.com>2020-11-19 08:58:38 -0500
committerXiangling Liao <Xiangling.Liao@ibm.com>2020-11-19 09:24:01 -0500
commit17497ec514f7a87e0ac39a803534b3a324a19324 (patch)
tree9ad02ad93d795164101baad0adce46a2ac064a27 /clang/lib/CodeGen/CodeGenModule.h
parent9e39a5d9a68af70c58ac415e51e6b12cd85f9af2 (diff)
downloadllvm-17497ec514f7a87e0ac39a803534b3a324a19324.zip
llvm-17497ec514f7a87e0ac39a803534b3a324a19324.tar.gz
llvm-17497ec514f7a87e0ac39a803534b3a324a19324.tar.bz2
[AIX][FE] Support constructor/destructor attribute
Support attribute((constructor)) and attribute((destructor)) on AIX Differential Revision: https://reviews.llvm.org/D90892
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h
index 8996805..7d812b6 100644
--- a/clang/lib/CodeGen/CodeGenModule.h
+++ b/clang/lib/CodeGen/CodeGenModule.h
@@ -1478,7 +1478,8 @@ private:
// FIXME: Hardcoding priority here is gross.
void AddGlobalCtor(llvm::Function *Ctor, int Priority = 65535,
llvm::Constant *AssociatedData = nullptr);
- void AddGlobalDtor(llvm::Function *Dtor, int Priority = 65535);
+ void AddGlobalDtor(llvm::Function *Dtor, int Priority = 65535,
+ bool IsDtorAttrFunc = false);
/// EmitCtorList - Generates a global array of functions and priorities using
/// the given list and name. This array will have appending linkage and is
@@ -1508,6 +1509,11 @@ private:
/// __cxa_atexit, if it is available, or atexit otherwise.
void registerGlobalDtorsWithAtExit();
+ // When using sinit and sterm functions, unregister
+ // __attribute__((destructor)) annotated functions which were previously
+ // registered by the atexit subroutine using unatexit.
+ void unregisterGlobalDtorsWithUnAtExit();
+
void emitMultiVersionFunctions();
/// Emit any vtables which we deferred and still have a use for.