diff options
author | Fangrui Song <i@maskray.me> | 2022-12-14 08:01:04 +0000 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2022-12-14 08:01:04 +0000 |
commit | da2f5d0a410bd4188792980739ca49f4169b8bd4 (patch) | |
tree | fbca7d0b3c4fab63b2536c58c53085f579c4593f /llvm/tools/llvm-profgen/PerfReader.cpp | |
parent | d4b6fcb32e29d0cd834a3c89205fef48fbfc1d2d (diff) | |
download | llvm-da2f5d0a410bd4188792980739ca49f4169b8bd4.zip llvm-da2f5d0a410bd4188792980739ca49f4169b8bd4.tar.gz llvm-da2f5d0a410bd4188792980739ca49f4169b8bd4.tar.bz2 |
[tools] llvm::Optional => std::optional
Diffstat (limited to 'llvm/tools/llvm-profgen/PerfReader.cpp')
-rw-r--r-- | llvm/tools/llvm-profgen/PerfReader.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/tools/llvm-profgen/PerfReader.cpp b/llvm/tools/llvm-profgen/PerfReader.cpp index 14bc04b..86c0131 100644 --- a/llvm/tools/llvm-profgen/PerfReader.cpp +++ b/llvm/tools/llvm-profgen/PerfReader.cpp @@ -319,7 +319,7 @@ bool VirtualUnwinder::unwind(const PerfSample *Sample, uint64_t Repeat) { std::unique_ptr<PerfReaderBase> PerfReaderBase::create(ProfiledBinary *Binary, PerfInputFile &PerfInput, - Optional<uint32_t> PIDFilter) { + std::optional<uint32_t> PIDFilter) { std::unique_ptr<PerfReaderBase> PerfReader; if (PerfInput.Format == PerfFormat::UnsymbolizedProfile) { @@ -350,8 +350,10 @@ PerfReaderBase::create(ProfiledBinary *Binary, PerfInputFile &PerfInput, return PerfReader; } -PerfInputFile PerfScriptReader::convertPerfDataToTrace( - ProfiledBinary *Binary, PerfInputFile &File, Optional<uint32_t> PIDFilter) { +PerfInputFile +PerfScriptReader::convertPerfDataToTrace(ProfiledBinary *Binary, + PerfInputFile &File, + std::optional<uint32_t> PIDFilter) { StringRef PerfData = File.InputFile; // Run perf script to retrieve PIDs matching binary we're interested in. auto PerfExecutable = sys::Process::FindInEnvPath("PATH", "perf"); |