Add LLVM_LVALUE_FUNCTION to llvm's Optional::map.

Bug: chromium:1488559

Change-Id: I2db1e262980381d433d839fb349e28a021f4ba87
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/72468
Tested-by: Shahbaz Youssefi <syoussefi@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@google.com>
diff --git a/third_party/llvm-10.0/llvm/include/llvm/ADT/Optional.h b/third_party/llvm-10.0/llvm/include/llvm/ADT/Optional.h
index c84f9aa..c64b823 100644
--- a/third_party/llvm-10.0/llvm/include/llvm/ADT/Optional.h
+++ b/third_party/llvm-10.0/llvm/include/llvm/ADT/Optional.h
@@ -269,7 +269,7 @@
 
   /// Apply a function to the value if present; otherwise return None.
   template <class Function>
-  auto map(const Function &F) const
+  auto map(const Function &F) const LLVM_LVALUE_FUNCTION
       -> Optional<decltype(F(getValue()))> {
     if (*this) return F(getValue());
     return None;