Skip to content

Commit 90cfbb8

Browse files
committed
Add LLVM_VALUE_FUNCTION to Optional::map(); NFC
This is for future-proofing when compiling with MSVC once we drop support for 2017.
1 parent 8f21acb commit 90cfbb8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/include/llvm/ADT/Optional.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ template <typename T> class Optional {
269269

270270
/// Apply a function to the value if present; otherwise return None.
271271
template <class Function>
272-
auto map(const Function &F) const
272+
auto map(const Function &F) const LLVM_LVALUE_FUNCTION
273273
-> Optional<decltype(F(getValue()))> {
274274
if (*this) return F(getValue());
275275
return None;

0 commit comments

Comments
 (0)