[llvm] 20f6eb7 - [llvm] Use Optional::operator-> (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 21 00:15:41 PST 2022
Author: Kazu Hirata
Date: 2022-11-21T00:15:35-08:00
New Revision: 20f6eb7c982b8d894775a3e28b7a4c402628aafa
URL: https://github.com/llvm/llvm-project/commit/20f6eb7c982b8d894775a3e28b7a4c402628aafa
DIFF: https://github.com/llvm/llvm-project/commit/20f6eb7c982b8d894775a3e28b7a4c402628aafa.diff
LOG: [llvm] Use Optional::operator-> (NFC)
Since std::optional does not offer getPointer(), this patch replaces
X.getPointer()->foo with X->foo to make the migration from
llvm::Optional to std::optional easier.
This is part of an effort to migrate from llvm::Optional to
std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
Added:
Modified:
llvm/include/llvm/ExecutionEngine/Orc/Speculation.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/Speculation.h b/llvm/include/llvm/ExecutionEngine/Orc/Speculation.h
index b7bba7a487865..17bc5747c23ab 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/Speculation.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/Speculation.h
@@ -90,8 +90,8 @@ class Speculator {
// try to distinguish already compiled & library symbols
if (!ImplSymbol)
continue;
- const auto &ImplSymbolName = ImplSymbol.getPointer()->first;
- JITDylib *ImplJD = ImplSymbol.getPointer()->second;
+ const auto &ImplSymbolName = ImplSymbol->first;
+ JITDylib *ImplJD = ImplSymbol->second;
auto &SymbolsInJD = SpeculativeLookUpImpls[ImplJD];
SymbolsInJD.insert(ImplSymbolName);
}
More information about the llvm-commits
mailing list