commit | 5b6f768198ce6a6485da31e1be06b5a17a2bf0a0 | [log] [tgz] |
---|---|---|
author | Zequan Wu <zequanwu@google.com> | Mon Oct 02 15:15:41 2023 -0400 |
committer | swiftshader-scoped@luci-project-accounts.iam.gserviceaccount.com <swiftshader-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Oct 02 20:22:45 2023 +0000 |
tree | c82fc17c573093e45cf858dd556b60d0a96cf23c | |
parent | 7f4d495c89c200c1945cce5995d348dd41dadb5a [diff] |
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;