diff options
| author | Chris Lattner <sabre@nondot.org> | 2005-03-15 04:54:21 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2005-03-15 04:54:21 +0000 |
| commit | 531f9e92d4d06d5cb1f250754c68e7d3b420df50 (patch) | |
| tree | 741411707d21f866eb629b2449413d85b8b48667 /llvm/lib/Transforms/Instrumentation | |
| parent | 5ce25cdc6d8d274d9106280d861adaf4743e5f3d (diff) | |
| download | bcm5719-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/Instrumentation')
| -rw-r--r-- | llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp | 8 | ||||
| -rw-r--r-- | llvm/lib/Transforms/Instrumentation/TraceValues.cpp | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp b/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp index 1c0c4ada32f..5ce01427164 100644 --- a/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp +++ b/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp @@ -55,11 +55,11 @@ void llvm::InsertProfilingInitCall(Function *MainFn, const char *FnName, Instruction *InitCall = new CallInst(InitFn, Args, "newargc", InsertPos); // If argc or argv are not available in main, just pass null values in. - Function::aiterator AI; - switch (MainFn->asize()) { + Function::arg_iterator AI; + switch (MainFn->arg_size()) { default: case 2: - AI = MainFn->abegin(); ++AI; + AI = MainFn->arg_begin(); ++AI; if (AI->getType() != ArgVTy) { InitCall->setOperand(2, new CastInst(AI, ArgVTy, "argv.cast", InitCall)); } else { @@ -67,7 +67,7 @@ void llvm::InsertProfilingInitCall(Function *MainFn, const char *FnName, } case 1: - AI = MainFn->abegin(); + AI = MainFn->arg_begin(); // If the program looked at argc, have it look at the return value of the // init call instead. if (AI->getType() != Type::IntTy) { diff --git a/llvm/lib/Transforms/Instrumentation/TraceValues.cpp b/llvm/lib/Transforms/Instrumentation/TraceValues.cpp index f645f1b451b..5be8637a20b 100644 --- a/llvm/lib/Transforms/Instrumentation/TraceValues.cpp +++ b/llvm/lib/Transforms/Instrumentation/TraceValues.cpp @@ -367,7 +367,7 @@ static inline void InsertCodeToShowFunctionEntry(Function &F, Function *Printf, // Now print all the incoming arguments unsigned ArgNo = 0; - for (Function::aiterator I = F.abegin(), E = F.aend(); I != E; ++I, ++ArgNo){ + for (Function::arg_iterator I = F.arg_begin(), E = F.arg_end(); I != E; ++I, ++ArgNo){ InsertVerbosePrintInst(I, &BB, InsertPos, " Arg #" + utostr(ArgNo) + ": ", Printf, HashPtrToSeqNum); |

