diff options
author | Chris Lattner <sabre@nondot.org> | 2003-02-14 05:34:36 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-02-14 05:34:36 +0000 |
commit | a3183be835b09ad0a5bb94fbac6756ff4ba956ed (patch) | |
tree | ca4ef8af79627419ec7a3c4dd1e4d63207ed45d1 /lib/Transforms | |
parent | 1a1a85d5144a2ef13bb14663babe47a8ee1f2f00 (diff) |
Fix a misunderstanding of the standard associative containers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5565 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/IPO/DeadTypeElimination.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/Transforms/IPO/DeadTypeElimination.cpp b/lib/Transforms/IPO/DeadTypeElimination.cpp index 2ea9ac2a56..cfd0c39569 100644 --- a/lib/Transforms/IPO/DeadTypeElimination.cpp +++ b/lib/Transforms/IPO/DeadTypeElimination.cpp @@ -77,15 +77,10 @@ bool DTE::run(Module &M) { for (SymbolTable::VarMap::iterator PI = Plane.begin(); PI != Plane.end();) // If this entry should be unconditionally removed, or if we detect that // the type is not used, remove it. - // if (ShouldNukeSymtabEntry(*PI) || !UsedTypes.count(cast<Type>(PI->second))) { -#if MAP_IS_NOT_BRAINDEAD - PI = Plane.erase(PI); // STD C++ Map should support this! -#else - Plane.erase(PI); // Alas, GCC 2.95.3 doesn't *SIGH* - PI = Plane.begin(); -#endif + SymbolTable::VarMap::iterator PJ = PI++; + Plane.erase(PJ); ++NumKilled; Changed = true; } else { |