mirror of
https://github.com/intel/llvm.git
synced 2026-02-01 00:46:45 +08:00
Add count() method to MapVector
llvm-svn: 165559
This commit is contained in:
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user