1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

Add LLVM_VALUE_FUNCTION to Optional::map(); NFC

This is for future-proofing when compiling with MSVC once we drop support for 2017.
This commit is contained in:
Aaron Ballman 2020-01-22 14:20:15 -05:00
parent 068346b51e
commit 047716a57a

View File

@ -269,7 +269,7 @@ public:
/// Apply a function to the value if present; otherwise return None. /// Apply a function to the value if present; otherwise return None.
template <class Function> template <class Function>
auto map(const Function &F) const auto map(const Function &F) const LLVM_LVALUE_FUNCTION
-> Optional<decltype(F(getValue()))> { -> Optional<decltype(F(getValue()))> {
if (*this) return F(getValue()); if (*this) return F(getValue());
return None; return None;