diff options
author | Chris Lattner <sabre@nondot.org> | 2008-07-02 05:26:32 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-07-02 05:26:32 +0000 |
commit | fce6e546aab64602c41eeb83381b7617f97d0069 (patch) | |
tree | 949b716d935784d11e67fe85578a2cc56013a74e /lib/CodeGen/CollectorMetadata.cpp | |
parent | 1e41f6d724d6cecd4c3b3409da84608b2df16069 (diff) |
Add a new (simple) StringMap::clear method, patch by Pratik
Solanki!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53008 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CollectorMetadata.cpp')
-rw-r--r-- | lib/CodeGen/CollectorMetadata.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/CodeGen/CollectorMetadata.cpp b/lib/CodeGen/CollectorMetadata.cpp index 7a5a699a11..5b8c7c7999 100644 --- a/lib/CodeGen/CollectorMetadata.cpp +++ b/lib/CodeGen/CollectorMetadata.cpp @@ -112,10 +112,7 @@ CollectorMetadata &CollectorModuleMetadata::get(const Function &F) { 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; |