[all-commits] [llvm/llvm-project] 70dce3: [mlir] Migrate away from std::nullopt (NFC) (#145842)

Kazu Hirata via All-commits all-commits at lists.llvm.org
Thu Jun 26 08:41:25 PDT 2025


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

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOpBase.td
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/include/mlir/IR/Matchers.h
    M mlir/include/mlir/IR/PatternMatch.h
    M mlir/include/mlir/Tools/PDLL/AST/Nodes.h
    M mlir/lib/Dialect/Async/IR/Async.cpp
    M mlir/lib/Dialect/EmitC/IR/EmitC.cpp
    M mlir/lib/Dialect/Func/IR/FuncOps.cpp
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/Dialect/Shape/IR/Shape.cpp
    M mlir/lib/Reducer/Tester.cpp
    M mlir/lib/Target/LLVMIR/LoopAnnotationTranslation.cpp
    M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
    M mlir/lib/Tools/PDLL/Parser/Parser.cpp
    M mlir/unittests/Debug/FileLineColLocBreakpointManagerTest.cpp
    M mlir/unittests/IR/OperationSupportTest.cpp
    M mlir/unittests/IR/ValueTest.cpp
    M mlir/unittests/Transforms/DialectConversion.cpp

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

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 replaces {} with 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