From e4d5c441e04bdc00ccf1804744af670655123b07 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 15 Mar 2005 04:54:21 +0000 Subject: This mega patch converts us from using Function::a{iterator|begin|end} to using Function::arg_{iterator|begin|end}. Likewise Module::g* -> Module::global_*. This patch is contributed by Gabor Greif, thanks! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20597 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Utils/CloneModule.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/Transforms/Utils/CloneModule.cpp') 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(ValueMap[I]); if (I->hasInitializer()) GV->setInitializer(cast(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(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++; } -- cgit v1.2.3-18-g5258