Solanki!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53008
91177308-0d34-0410-b5e6-
96231b3b80d8
return true;
}
+ // clear - Empties out the StringMap
+ void clear() {
+ while (!empty())
+ erase(begin());
+ }
+
/// GetOrCreateValue - Look up the specified key in the table. If a value
/// exists, return it. Otherwise, default construct a value, insert it, and
/// return.
void CollectorModuleMetadata::clear() {
Map.clear();
-
- // TODO: StringMap should provide a clear method.
- while (!NameMap.empty())
- NameMap.erase(NameMap.begin());
+ NameMap.clear();
for (iterator I = begin(), E = end(); I != E; ++I)
delete *I;