[flang-commits] [flang] [mlir] Make MLIR Value more consistent in terms of `const` "correctness" (NFC) (PR #72765)

Mehdi Amini via flang-commits flang-commits at lists.llvm.org
Mon Nov 20 16:31:11 PST 2023


================
@@ -335,8 +335,9 @@ namespace llvm {
     MutableArrayRef(T *begin, T *end) : ArrayRef<T>(begin, end) {}
 
     /// Construct a MutableArrayRef from a SmallVector.
-    /*implicit*/ MutableArrayRef(SmallVectorImpl<T> &Vec)
-    : ArrayRef<T>(Vec) {}
+    template <typename U>
+    /*implicit*/ MutableArrayRef(const SmallVectorTemplateCommon<T, U> &Vec)
+        : ArrayRef<T>(Vec) {}
----------------
joker-eph wrote:

> For the core ADTs we've been pretty good about it, I think

Uh... I would say we've been "OK" at it, recently. And mostly in terms of non-NFC changes (that is: not what I'm doing here).

But if we're looking at the history of ADT, it's far from that, for example what about the testing for: https://github.com/llvm/llvm-project/commit/24f09cc82d3d6f0e0c8c1a342efa6c840f77e324
(that is just a random change I found when looking at the difference between the ArrayRef/MutableArrayRef constructor, ArrayRef being templated, I'm sure I can find plenty more).

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


More information about the flang-commits mailing list