[llvm-commits] CVS: llvm/lib/Transforms/Utils/CloneModule.cpp
LLVM
llvm at cs.uiuc.edu
Tue May 25 07:21:40 PDT 2004
Changes in directory llvm/lib/Transforms/Utils:
CloneModule.cpp updated: 1.9 -> 1.10
---
Log message:
Convert to SymbolTable's new iteration interface.
---
Diffs of the changes: (+7 -5)
Index: llvm/lib/Transforms/Utils/CloneModule.cpp
diff -u llvm/lib/Transforms/Utils/CloneModule.cpp:1.9 llvm/lib/Transforms/Utils/CloneModule.cpp:1.10
--- llvm/lib/Transforms/Utils/CloneModule.cpp:1.9 Fri Jan 9 00:12:15 2004
+++ llvm/lib/Transforms/Utils/CloneModule.cpp Tue May 25 03:51:47 2004
@@ -33,11 +33,11 @@
// Copy all of the type symbol table entries over...
const SymbolTable &SymTab = M->getSymbolTable();
- SymbolTable::const_iterator TypeI = SymTab.find(Type::TypeTy);
- if (TypeI != SymTab.end())
- for (SymbolTable::VarMap::const_iterator I = TypeI->second.begin(),
- E = TypeI->second.end(); I != E; ++I)
- New->addTypeName(I->first, cast<Type>(I->second));
+ SymbolTable::type_const_iterator TypeI = SymTab.type_begin();
+ SymbolTable::type_const_iterator TypeE = SymTab.type_end();
+ for ( ; TypeI != TypeE; ++TypeI ) {
+ New->addTypeName(TypeI->first, TypeI->second);
+ }
// Create the value map that maps things from the old module over to the new
// module.
@@ -89,3 +89,5 @@
return New;
}
+
+// vim: sw=2
More information about the llvm-commits
mailing list