jasonliu added a comment.

-fregister_global_dtors_with_atexit does not seem to work properly in current 
implementation. 
We should consider somehow disabling/report_fatal_error it instead of letting 
it generate invalid code on AIX.



================
Comment at: clang/lib/CodeGen/CGDeclCXX.cpp:594
+           "Cannot produce a unique identifier for this module based on strong 
"
+           "external symbols.");
+    GlobalUniqueModuleId = GlobalUniqueModuleId.substr(1);
----------------
I think report_fatal_error is more appropriate here? Since we know some case 
will trigger this, and we do not want those case to silently pass in 
non-assertion mode?


================
Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:4452
+
+  // Emit __sterm function to unregister __srterm and call __srterm.
+  emitCXXGlobalVarDeclDestructFunc(D, dtorStub, addr);
----------------
This comment is confusing.
This is not emitting `__sterm` function, this is emitting 
`__cxx_global_var_destruct` functions. And again, we do not have `__srterm` 
function in this implementation. 


================
Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:4468
+  const CGFunctionInfo &FI = CGM.getTypes().arrangeNullaryFunction();
+  llvm::Function *StermFn = CGM.CreateGlobalInitOrDestructFunction(
+      FTy, FnName.str(), FI, D.getLocation());
----------------
nit: this is not sterm function.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74166/new/

https://reviews.llvm.org/D74166



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to