mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
Convert to SymbolTable's new iteration interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13754 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -33,11 +33,11 @@ Module *llvm::CloneModule(const Module *M) {
|
||||
|
||||
// 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 @@ Module *llvm::CloneModule(const Module *M) {
|
||||
|
||||
return New;
|
||||
}
|
||||
|
||||
// vim: sw=2
|
||||
|
||||
Reference in New Issue
Block a user