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-cov/CodeCoverage.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-cov/CodeCoverage.cpp')
| -rw-r--r-- | llvm/tools/llvm-cov/CodeCoverage.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/tools/llvm-cov/CodeCoverage.cpp b/llvm/tools/llvm-cov/CodeCoverage.cpp index d2dfbc2..6010362 100644 --- a/llvm/tools/llvm-cov/CodeCoverage.cpp +++ b/llvm/tools/llvm-cov/CodeCoverage.cpp @@ -85,7 +85,7 @@ private: bool isEquivalentFile(StringRef FilePath1, StringRef FilePath2); /// Retrieve a file status with a cache. - Optional<sys::fs::file_status> getFileStatus(StringRef FilePath); + std::optional<sys::fs::file_status> getFileStatus(StringRef FilePath); /// Return a memory buffer for the given source file. ErrorOr<const MemoryBuffer &> getSourceFile(StringRef SourceFile); @@ -161,7 +161,7 @@ private: 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; + StringMap<std::optional<sys::fs::file_status>> FileStatusCache; /// The architecture the coverage mapping data targets. std::vector<StringRef> CoverageArches; @@ -249,7 +249,7 @@ void CodeCoverageTool::collectPaths(const std::string &Path) { } } -Optional<sys::fs::file_status> +std::optional<sys::fs::file_status> CodeCoverageTool::getFileStatus(StringRef FilePath) { auto It = FileStatusCache.try_emplace(FilePath); auto &CachedStatus = It.first->getValue(); |
