llvm-project
dec93ae4 - [mlir] Migrate away from ValueRange(std::nullopt) (NFC) (#145210)

Commit
138 days ago
[mlir] Migrate away from ValueRange(std::nullopt) (NFC) (#145210) 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. One of the common uses of std::nullopt is in one of the constructors for ValueRange. This patch takes care of the migration where we need ValueRange() to facilitate perfect forwarding. Note that {} would be ambiguous for perfecting forwarding to work.
Parents
Loading