[llvm] 18fd2aa - [ProfileData] Use std::optional in InstrProfCorrelator.cpp (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 10 08:25:55 PST 2022
Author: Kazu Hirata
Date: 2022-12-10T08:25:50-08:00
New Revision: 18fd2aa372430b483558ca671f8aa34fc0be54b0
URL: https://github.com/llvm/llvm-project/commit/18fd2aa372430b483558ca671f8aa34fc0be54b0
DIFF: https://github.com/llvm/llvm-project/commit/18fd2aa372430b483558ca671f8aa34fc0be54b0.diff
LOG: [ProfileData] Use std::optional in InstrProfCorrelator.cpp (NFC)
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/lib/ProfileData/InstrProfCorrelator.cpp
Removed:
################################################################################
diff --git a/llvm/lib/ProfileData/InstrProfCorrelator.cpp b/llvm/lib/ProfileData/InstrProfCorrelator.cpp
index a727ff7cf6ef3..6bab3c41b9ca1 100644
--- a/llvm/lib/ProfileData/InstrProfCorrelator.cpp
+++ b/llvm/lib/ProfileData/InstrProfCorrelator.cpp
@@ -264,7 +264,7 @@ void DwarfInstrProfCorrelator<IntPtrT>::correlateProfileDataImpl(
auto maybeAddProbe = [&](DWARFDie Die) {
if (!isDIEOfProbe(Die))
return;
- Optional<const char *> FunctionName;
+ std::optional<const char *> FunctionName;
std::optional<uint64_t> CFGHash;
Optional<uint64_t> CounterPtr = getLocation(Die);
auto FnDie = Die.getParent();
More information about the llvm-commits
mailing list