Skip to content

Commit

Permalink
[llvm-cov] Use std::optional in CodeCoverage.cpp (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 27, 2022
1 parent fc93812 commit f64505c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion llvm/tools/llvm-cov/CodeCoverage.cpp
Expand Up @@ -41,6 +41,7 @@

#include <functional>
#include <map>
#include <optional>
#include <system_error>

using namespace llvm;
Expand Down Expand Up @@ -157,7 +158,7 @@ class CodeCoverageTool {

/// The coverage data path to be remapped from, and the source path to be
/// remapped to, when using -path-equivalence.
Optional<std::pair<std::string, std::string>> PathRemapping;
std::optional<std::pair<std::string, std::string>> PathRemapping;

/// File status cache used when finding the same file.
StringMap<Optional<sys::fs::file_status>> FileStatusCache;
Expand Down

0 comments on commit f64505c

Please sign in to comment.