[all-commits] [llvm/llvm-project] e6ebf8: [mlir] Migrate away from ArrayRef(std::nullopt) (N...

Kazu Hirata via All-commits all-commits at lists.llvm.org
Sat Jun 21 08:21:11 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e6ebf8f99ba27d60026c7473b0cd5e24c855b018
      https://github.com/llvm/llvm-project/commit/e6ebf8f99ba27d60026c7473b0cd5e24c855b018
  Author: Kazu Hirata <kazu at google.com>
  Date:   2025-06-21 (Sat, 21 Jun 2025)

  Changed paths:
    M mlir/include/mlir/CAPI/Wrap.h
    M mlir/include/mlir/Dialect/PDL/IR/PDLOps.td
    M mlir/include/mlir/IR/BuiltinAttributes.td
    M mlir/include/mlir/Support/StorageUniquer.h
    M mlir/lib/Interfaces/FunctionInterfaces.cpp
    M mlir/lib/Tools/PDLL/Parser/Parser.cpp
    M mlir/lib/Tools/mlir-pdll-lsp-server/PDLLServer.cpp
    M mlir/test/lib/Dialect/Test/TestAttributes.cpp

  Log Message:
  -----------
  [mlir] Migrate away from ArrayRef(std::nullopt) (NFC) (#145140)

ArrayRef has a constructor that accepts std::nullopt.  This
constructor dates back to the days when we still had llvm::Optional.

Since the use of std::nullopt outside the context of std::optional is
kind of abuse and not intuitive to new comers, I would like to move
away from the constructor and eventually remove it.

This patch takes care of the mlir side of the migration, starting with
straightforward places like "return std::nullopt;" and ternally
expressions involving std::nullopt.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list