[PATCH] D73429: [mlir][NFC] Update Operation::getResultTypes to use ArrayRef<Type> instead of iterator_range.

Uday Bondhugula via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 26 04:02:50 PST 2020


bondhugula added inline comments.


================
Comment at: mlir/lib/IR/Operation.cpp:554
 
+auto Operation::getResultTypes() -> result_type_range {
+  if (!resultType)
----------------
result_type_range -> ArrayRef<Type>


================
Comment at: mlir/test/lib/TestDialect/TestPatterns.cpp:257
     // If the type is F32, change the type to F64.
-    if (!(*op->result_type_begin()).isF32())
+    if (!Type(*op->result_type_begin()).isF32())
       return matchFailure();
----------------
This pattern looks like a concern. Do we get a warning if we didn't use the Type ctor? It's not clear to me why we need it now. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73429





More information about the llvm-commits mailing list