[flang-commits] [flang] [flang] Avoid unnecessary looping for constants (PR #156403)

Miguel Saldivar via flang-commits flang-commits at lists.llvm.org
Tue Sep 2 07:28:31 PDT 2025


================
@@ -152,6 +152,23 @@ class DenseGlobalBuilder {
                       : TC;
     attributeElementType =
         Fortran::lower::getFIRType(builder.getContext(), attrTc, KIND, {});
+
+    auto values = constant.values();
----------------
Saldivarcher wrote:

I had to add:
```cpp
    using Element =
        Fortran::evaluate::Scalar<Fortran::evaluate::Type<TC, KIND>>;
```
To get the full type, is this the best way to do it?

https://github.com/llvm/llvm-project/pull/156403


More information about the flang-commits mailing list