diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2021-06-13 19:31:46 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2021-06-13 19:37:19 +0000 |
commit | e8d8bef961a50d4dc22501cde4fb9fb0be1b2532 (patch) | |
tree | 94f04805f47bb7c59ae29690d8952b6074fff602 /contrib/llvm-project/llvm/lib/Testing/Support/Annotations.cpp | |
parent | bb130ff39747b94592cb26d71b7cb097b9a4ea6b (diff) | |
parent | b60736ec1405bb0a8dd40989f67ef4c93da068ab (diff) |
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Testing/Support/Annotations.cpp')
-rw-r--r-- | contrib/llvm-project/llvm/lib/Testing/Support/Annotations.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/contrib/llvm-project/llvm/lib/Testing/Support/Annotations.cpp b/contrib/llvm-project/llvm/lib/Testing/Support/Annotations.cpp index 09c572011d36..24607bd4c7d8 100644 --- a/contrib/llvm-project/llvm/lib/Testing/Support/Annotations.cpp +++ b/contrib/llvm-project/llvm/lib/Testing/Support/Annotations.cpp @@ -72,8 +72,10 @@ size_t Annotations::point(llvm::StringRef Name) const { } std::vector<size_t> Annotations::points(llvm::StringRef Name) const { - auto P = Points.lookup(Name); - return {P.begin(), P.end()}; + auto I = Points.find(Name); + if (I == Points.end()) + return {}; + return {I->getValue().begin(), I->getValue().end()}; } Annotations::Range Annotations::range(llvm::StringRef Name) const { @@ -85,8 +87,10 @@ Annotations::Range Annotations::range(llvm::StringRef Name) const { std::vector<Annotations::Range> Annotations::ranges(llvm::StringRef Name) const { - auto R = Ranges.lookup(Name); - return {R.begin(), R.end()}; + auto I = Ranges.find(Name); + if (I == Ranges.end()) + return {}; + return {I->getValue().begin(), I->getValue().end()}; } llvm::raw_ostream &llvm::operator<<(llvm::raw_ostream &O, |