aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/lib/Testing/Support/Annotations.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Testing/Support/Annotations.cpp')
-rw-r--r--contrib/llvm-project/llvm/lib/Testing/Support/Annotations.cpp12
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,