Add count() method to MapVector

llvm-svn: 165559
This commit is contained in:
Douglas Gregor
2012-10-09 23:02:47 +00:00
parent bbbbac6012
commit 79258ca2cc

View File

@@ -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;
}
};
}