[llvm] 492a60d - [ProfileData] Use std::optional in MemProf.h (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 27 18:26:16 PST 2022
Author: Kazu Hirata
Date: 2022-11-27T18:24:39-08:00
New Revision: 492a60dc0b25494834b6c81004a36fda3929cd7e
URL: https://github.com/llvm/llvm-project/commit/492a60dc0b25494834b6c81004a36fda3929cd7e
DIFF: https://github.com/llvm/llvm-project/commit/492a60dc0b25494834b6c81004a36fda3929cd7e.diff
LOG: [ProfileData] Use std::optional in MemProf.h (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/include/llvm/ProfileData/MemProf.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/ProfileData/MemProf.h b/llvm/include/llvm/ProfileData/MemProf.h
index bcee3b25bf875..d0ba5b10be02e 100644
--- a/llvm/include/llvm/ProfileData/MemProf.h
+++ b/llvm/include/llvm/ProfileData/MemProf.h
@@ -11,6 +11,7 @@
#include "llvm/Support/raw_ostream.h"
#include <cstdint>
+#include <optional>
namespace llvm {
namespace memprof {
@@ -144,7 +145,7 @@ struct Frame {
GlobalValue::GUID Function;
// The symbol name for the function. Only populated in the Frame by the reader
// if requested during initialization. This field should not be serialized.
- llvm::Optional<std::string> SymbolName;
+ std::optional<std::string> SymbolName;
// The source line offset of the call from the beginning of parent function.
uint32_t LineOffset;
// The source column number of the call to help distinguish multiple calls
More information about the llvm-commits
mailing list