================
@@ -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 {
----------------
NimishMishra wrote:

Thanks. That could be done. Can you help me understand whether such changes 
will still enable us to do the following:

1. Make calls like `achar(...)`, which would be required when we upstream 
support for `-finit-character`
2. Make calls like `x = ieee_value(x, ieee_quiet_nan)`, which would be required 
when we support `-finit-real` (would fix 
https://github.com/llvm/llvm-project/issues/159794). We also need similar 
`ieee_value` calls for `inf/nan/snan/-inf`.

  The reason I thought to handle assignments through `parser::` is that I could 
not understand how we could directly emit such assignments as I exemplified 
here through HLFIR. Although I understand such calls are not needed for this 
PR, I intend to share functionality for all `-finit-*` flags. If there is a way 
where we can handle these cases in HLFIR, I would be happy to rework this PR.

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