aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/ADT/MapVector.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/ADT/MapVector.h')
-rw-r--r--include/llvm/ADT/MapVector.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/ADT/MapVector.h b/include/llvm/ADT/MapVector.h
index 3f7a596..6aacca5 100644
--- a/include/llvm/ADT/MapVector.h
+++ b/include/llvm/ADT/MapVector.h
@@ -78,6 +78,11 @@ public:
}
return Vector[I].second;
}
+
+ unsigned count(const KeyT &Key) const {
+ typename MapType::const_iterator Pos = Map.find(Key);
+ return Pos == Map.end()? 0 : 1;
+ }
};
}