stop using arg_front
authorChris Lattner <sabre@nondot.org>
Tue, 15 Mar 2005 05:03:36 +0000 (05:03 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 15 Mar 2005 05:03:36 +0000 (05:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20599 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/CBackend/CBackend.cpp
lib/Target/CBackend/Writer.cpp
lib/VMCore/AsmWriter.cpp

index 254b5a488ff2b015752b48d640ce7bd3bca577f2..cebff7508c22a0142dbbebf92bceebf9e0e7e722 100644 (file)
@@ -1079,7 +1079,7 @@ void CWriter::printFunctionSignature(const Function *F, bool Prototype) {
       std::string ArgName;
       if (F->arg_begin()->hasName() || !Prototype)
         ArgName = Mang->getValueName(F->arg_begin());
-      printType(FunctionInnards, F->arg_front().getType(), ArgName);
+      printType(FunctionInnards, F->arg_begin()->getType(), ArgName);
       for (Function::const_arg_iterator I = ++F->arg_begin(), E = F->arg_end();
            I != E; ++I) {
         FunctionInnards << ", ";
index 254b5a488ff2b015752b48d640ce7bd3bca577f2..cebff7508c22a0142dbbebf92bceebf9e0e7e722 100644 (file)
@@ -1079,7 +1079,7 @@ void CWriter::printFunctionSignature(const Function *F, bool Prototype) {
       std::string ArgName;
       if (F->arg_begin()->hasName() || !Prototype)
         ArgName = Mang->getValueName(F->arg_begin());
-      printType(FunctionInnards, F->arg_front().getType(), ArgName);
+      printType(FunctionInnards, F->arg_begin()->getType(), ArgName);
       for (Function::const_arg_iterator I = ++F->arg_begin(), E = F->arg_end();
            I != E; ++I) {
         FunctionInnards << ", ";
index 3f72cfbb900fc402778befb918e3e7303d419082..1049f962a4937ed32219ee70db6216cce376d937 100644 (file)
@@ -956,7 +956,7 @@ void AssemblyWriter::printFunction(const Function *F) {
 ///
 void AssemblyWriter::printArgument(const Argument *Arg) {
   // Insert commas as we go... the first arg doesn't get a comma
-  if (Arg != &Arg->getParent()->arg_front()) Out << ", ";
+  if (Arg != Arg->getParent()->arg_begin()) Out << ", ";
 
   // Output type...
   printType(Arg->getType());