[PATCH] D126189: [C++20][Modules] Build module static initializers per P1874R1.

Nathan Sidwell via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 23 05:53:50 PDT 2022


urnathan added inline comments.


================
Comment at: clang/lib/CodeGen/CGDeclCXX.cpp:626-627
+  // We create the function, even if it is empty, since an importer of this
+  // module will refer to it unconditionally (there is no way for an importer
+  // to know if the function could be omitted at this time).
+
----------------
'at this time' is ambiguous.  I think it means 'the current compiler implementation state', but it could also mean 'at this point in the compilation'.  I don't  think there's a general problem with such an optimization -- we could emit a flag into the BMI.  It's just we don't have the smarts to do that just yet.  right?


================
Comment at: clang/lib/CodeGen/CGDeclCXX.cpp:629
+
+  // Module initialisers for imported modules are emitted first.
+  // Collect the modules that we import
----------------
I'm with Morse about this, even before coming to live where I do.  You've used both 'ise' and 'ize'. s/ise/ize/


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126189



More information about the cfe-commits mailing list