summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/CloneFunction.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-03-15 04:54:21 +0000
committerChris Lattner <sabre@nondot.org>2005-03-15 04:54:21 +0000
commit531f9e92d4d06d5cb1f250754c68e7d3b420df50 (patch)
tree741411707d21f866eb629b2449413d85b8b48667 /llvm/lib/Transforms/Utils/CloneFunction.cpp
parent5ce25cdc6d8d274d9106280d861adaf4743e5f3d (diff)
downloadbcm5719-llvm-531f9e92d4d06d5cb1f250754c68e7d3b420df50.tar.gz
bcm5719-llvm-531f9e92d4d06d5cb1f250754c68e7d3b420df50.zip
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! llvm-svn: 20597
Diffstat (limited to 'llvm/lib/Transforms/Utils/CloneFunction.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/CloneFunction.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp
index 9bd8bf135fe..6440851b9de 100644
--- a/llvm/lib/Transforms/Utils/CloneFunction.cpp
+++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp
@@ -49,7 +49,7 @@ void llvm::CloneFunctionInto(Function *NewFunc, const Function *OldFunc,
assert(NameSuffix && "NameSuffix cannot be null!");
#ifndef NDEBUG
- for (Function::const_aiterator I = OldFunc->abegin(), E = OldFunc->aend();
+ for (Function::const_arg_iterator I = OldFunc->arg_begin(), E = OldFunc->arg_end();
I != E; ++I)
assert(ValueMap.count(I) && "No mapping from source argument specified!");
#endif
@@ -95,7 +95,7 @@ Function *llvm::CloneFunction(const Function *F,
// The user might be deleting arguments to the function by specifying them in
// the ValueMap. If so, we need to not add the arguments to the arg ty vector
//
- for (Function::const_aiterator I = F->abegin(), E = F->aend(); I != E; ++I)
+ for (Function::const_arg_iterator I = F->arg_begin(), E = F->arg_end(); I != E; ++I)
if (ValueMap.count(I) == 0) // Haven't mapped the argument to anything yet?
ArgTypes.push_back(I->getType());
@@ -107,8 +107,8 @@ Function *llvm::CloneFunction(const Function *F,
Function *NewF = new Function(FTy, F->getLinkage(), F->getName());
// Loop over the arguments, copying the names of the mapped arguments over...
- Function::aiterator DestI = NewF->abegin();
- for (Function::const_aiterator I = F->abegin(), E = F->aend(); I != E; ++I)
+ Function::arg_iterator DestI = NewF->arg_begin();
+ for (Function::const_arg_iterator I = F->arg_begin(), E = F->arg_end(); I != E; ++I)
if (ValueMap.count(I) == 0) { // Is this argument preserved?
DestI->setName(I->getName()); // Copy the name over...
ValueMap[I] = DestI++; // Add mapping to ValueMap
OpenPOWER on IntegriCloud