================
@@ -384,6 +384,159 @@ class TypeInfoConverter {
   llvm::SmallSetVector<Fortran::semantics::SymbolRef, 32> seen;
 };
 
+// Helper class to encapsulate utilities related to emission of implicit
+// assignments. `Implicit` here implies the assignment does not
+// exist in the Fortran source, but is implicit through definition
+// of one or more flagsets (like -finit-* family of flags).
+// General purpose usage of these utilities outside the
+// scope detailed here is discouraged, and is probably wrong.
+class ImplicitAssignmentGenerator {
----------------
jeanPerier wrote:

Why do you need to create `parser::` node to create the assignments?

You could simply work at the FIR level and generate hlfir.assign.

You can get the zero values using builder.createZeroValue for numerical and 
logical (using the element type from getFortranElementType).

For characters, you can should be able to use 
fir::factory::CharacterExprHelper::createSingletonFromCode()

https://github.com/llvm/llvm-project/pull/159788
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to