diff options
author | Kazu Hirata <kazu@google.com> | 2022-11-25 20:33:10 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2022-11-25 20:33:10 -0800 |
commit | e03868a4274547d016e98047a489455fd73f009a (patch) | |
tree | 744e94ddcd516ec9a3bb4f4671d3ffaa38d3770a /llvm/lib/ProfileData/Coverage/CoverageMapping.cpp | |
parent | 5d05d2966f4394e7f3fd5708ecc6f1b1c1156145 (diff) | |
download | llvm-e03868a4274547d016e98047a489455fd73f009a.zip llvm-e03868a4274547d016e98047a489455fd73f009a.tar.gz llvm-e03868a4274547d016e98047a489455fd73f009a.tar.bz2 |
[Coverage] Use std::optional in CoverageMapping.cpp (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
Diffstat (limited to 'llvm/lib/ProfileData/Coverage/CoverageMapping.cpp')
-rw-r--r-- | llvm/lib/ProfileData/Coverage/CoverageMapping.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp b/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp index 8c1eadb..712dfc0 100644 --- a/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp +++ b/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp @@ -33,6 +33,7 @@ #include <iterator> #include <map> #include <memory> +#include <optional> #include <string> #include <system_error> #include <utility> @@ -458,7 +459,7 @@ class SegmentBuilder { /// \p Loc: The start location of the next region. If None, all active /// regions are completed. /// \p FirstCompletedRegion: Index of the first completed region. - void completeRegionsUntil(Optional<LineColPair> Loc, + void completeRegionsUntil(std::optional<LineColPair> Loc, unsigned FirstCompletedRegion) { // Sort the completed regions by end location. This makes it simple to // emit closing segments in sorted order. |