[PATCH] D74166: [AIX][Frontend] Static init implementation for AIX considering no priority
Hubert Tong via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 18 14:50:31 PDT 2020
hubert.reinterpretcast accepted this revision.
hubert.reinterpretcast marked an inline comment as done.
hubert.reinterpretcast added a comment.
Thanks; LGTM with minor nit.
================
Comment at: clang/lib/CodeGen/CodeGenModule.h:1060
+
+ /// Add a sterm finalizer to the C++ global cleanup function.
+ void AddCXXStermFinalizerEntry(llvm::FunctionCallee DtorFn) {
----------------
Minor nit: "a sterm" should be "an sterm" if "sterm" is pronounced like "es-term".
================
Comment at: clang/test/CodeGenCXX/aix-static-init.cpp:188
+// CHECK: entry:
+// CHECK: call void @__finalize__ZZN5test41fEvE11staticLocal()
+// CHECK: call void @__finalize__ZN5test31tE()
----------------
Just a comment: The finalization order of static locals in relation to non-locals cannot (using the mechanisms available) be guaranteed to be consistent with the reverse order of initialization. I don't think that there is a clearly "correct" order, so "whatever falls out" is probably okay.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74166/new/
https://reviews.llvm.org/D74166
More information about the cfe-commits
mailing list