diff --git a/include/llvm/ADT/Optional.h b/include/llvm/ADT/Optional.h index c84f9aa8b34..c64b8235239 100644 --- a/include/llvm/ADT/Optional.h +++ b/include/llvm/ADT/Optional.h @@ -269,7 +269,7 @@ public: /// Apply a function to the value if present; otherwise return None. template - auto map(const Function &F) const + auto map(const Function &F) const LLVM_LVALUE_FUNCTION -> Optional { if (*this) return F(getValue()); return None;