[llvm-commits] CVS: llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp TraceValues.cpp

Chris Lattner lattner at cs.uiuc.edu
Mon Mar 14 20:55:02 PST 2005



Changes in directory llvm/lib/Transforms/Instrumentation:

ProfilingUtils.cpp updated: 1.4 -> 1.5
TraceValues.cpp updated: 1.71 -> 1.72
---
Log message:

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!



---
Diffs of the changes:  (+5 -5)

 ProfilingUtils.cpp |    8 ++++----
 TraceValues.cpp    |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)


Index: llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp
diff -u llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp:1.4 llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp:1.5
--- llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp:1.4	Sat Jul 17 19:21:14 2004
+++ llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp	Mon Mar 14 22:54:21 2005
@@ -55,11 +55,11 @@
   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 @@
     }
 
   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) {


Index: llvm/lib/Transforms/Instrumentation/TraceValues.cpp
diff -u llvm/lib/Transforms/Instrumentation/TraceValues.cpp:1.71 llvm/lib/Transforms/Instrumentation/TraceValues.cpp:1.72
--- llvm/lib/Transforms/Instrumentation/TraceValues.cpp:1.71	Tue Jan 25 10:23:57 2005
+++ llvm/lib/Transforms/Instrumentation/TraceValues.cpp	Mon Mar 14 22:54:21 2005
@@ -367,7 +367,7 @@
 
   // 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);






More information about the llvm-commits mailing list