[llvm] [LLVM] Use {} instead of std::nullopt to initialize empty ArrayRef (PR #109133)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 18 06:08:04 PDT 2024
================
@@ -10428,7 +10428,7 @@ SDValue SelectionDAG::getNode(unsigned Opcode, const SDLoc &DL, SDVTList VTList,
SDValue SelectionDAG::getNode(unsigned Opcode, const SDLoc &DL,
SDVTList VTList) {
- return getNode(Opcode, DL, VTList, std::nullopt);
+ return getNode(Opcode, DL, VTList, ArrayRef<SDValue>());
----------------
jayfoad wrote:
Couldn't use `{}` here due to ambiguity between:
```
SDValue getNode(unsigned Opcode, const SDLoc &DL, SDVTList VTList, ArrayRef<SDValue> Ops);
SDValue getNode(unsigned Opcode, const SDLoc &DL, SDVTList VTList, SDValue N);
```
https://github.com/llvm/llvm-project/pull/109133
More information about the llvm-commits
mailing list