diff options
Diffstat (limited to 'lib/Transforms/Utils/CloneModule.cpp')
-rw-r--r-- | lib/Transforms/Utils/CloneModule.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Transforms/Utils/CloneModule.cpp b/lib/Transforms/Utils/CloneModule.cpp index d98848aa7c..66e005e82c 100644 --- a/lib/Transforms/Utils/CloneModule.cpp +++ b/lib/Transforms/Utils/CloneModule.cpp @@ -47,7 +47,7 @@ Module *llvm::CloneModule(const Module *M) { // new module. Here we add them to the ValueMap and to the new Module. We // don't worry about attributes or initializers, they will come later. // - for (Module::const_giterator I = M->gbegin(), E = M->gend(); I != E; ++I) + for (Module::const_global_iterator I = M->global_begin(), E = M->global_end(); I != E; ++I) ValueMap[I] = new GlobalVariable(I->getType()->getElementType(), false, GlobalValue::ExternalLinkage, 0, I->getName(), New); @@ -61,7 +61,7 @@ Module *llvm::CloneModule(const Module *M) { // have been created, loop through and copy the global variable referrers // over... We also set the attributes on the global now. // - for (Module::const_giterator I = M->gbegin(), E = M->gend(); I != E; ++I) { + for (Module::const_global_iterator I = M->global_begin(), E = M->global_end(); I != E; ++I) { GlobalVariable *GV = cast<GlobalVariable>(ValueMap[I]); if (I->hasInitializer()) GV->setInitializer(cast<Constant>(MapValue(I->getInitializer(), @@ -74,8 +74,8 @@ Module *llvm::CloneModule(const Module *M) { for (Module::const_iterator I = M->begin(), E = M->end(); I != E; ++I) { Function *F = cast<Function>(ValueMap[I]); if (!I->isExternal()) { - Function::aiterator DestI = F->abegin(); - for (Function::const_aiterator J = I->abegin(); J != I->aend(); ++J) { + Function::arg_iterator DestI = F->arg_begin(); + for (Function::const_arg_iterator J = I->arg_begin(); J != I->arg_end(); ++J) { DestI->setName(J->getName()); ValueMap[J] = DestI++; } |