Skip to content

Commit

Permalink
[ProfileData] Use std::optional in MemProf.h (NFC)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
kazutakahirata committed Nov 28, 2022
1 parent 21c3df4 commit 492a60d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion llvm/include/llvm/ProfileData/MemProf.h
Expand Up @@ -11,6 +11,7 @@
#include "llvm/Support/raw_ostream.h"

#include <cstdint>
#include <optional>

namespace llvm {
namespace memprof {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 492a60d

Please sign in to comment.