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 | e4d5c441e04bdc00ccf1804744af670655123b07 (patch) | |
tree | be1bff1314e39651d7120d2d887b79b10dc2f24d /lib/VMCore | |
parent | 89cc2656ba070434dceeabe95cba0a95b988325b (diff) |
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
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/AsmWriter.cpp | 12 | ||||
-rw-r--r-- | lib/VMCore/Mangler.cpp | 2 | ||||
-rw-r--r-- | lib/VMCore/Module.cpp | 2 | ||||
-rw-r--r-- | lib/VMCore/Verifier.cpp | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index ea7a92ef36..3f72cfbb90 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -801,7 +801,7 @@ void AssemblyWriter::printModule(const Module *M) { // Loop over the symbol table, emitting all named constants. printSymbolTable(M->getSymbolTable()); - 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) printGlobal(I); Out << "\nimplementation ; Functions:\n"; @@ -926,7 +926,7 @@ void AssemblyWriter::printFunction(const Function *F) { // Loop over the arguments, printing them... const FunctionType *FT = F->getFunctionType(); - 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) printArgument(I); // Finish printing arguments... @@ -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()->afront()) Out << ", "; + if (Arg != &Arg->getParent()->arg_front()) Out << ", "; // Output type... printType(Arg->getType()); @@ -1361,7 +1361,7 @@ void SlotMachine::processModule() { SC_DEBUG("begin processModule!\n"); // Add all of the global variables to the value table... - for (Module::const_giterator I = TheModule->gbegin(), E = TheModule->gend(); + for (Module::const_global_iterator I = TheModule->global_begin(), E = TheModule->global_end(); I != E; ++I) createSlot(I); @@ -1379,8 +1379,8 @@ void SlotMachine::processFunction() { SC_DEBUG("begin processFunction!\n"); // Add all the function arguments - for(Function::const_aiterator AI = TheFunction->abegin(), - AE = TheFunction->aend(); AI != AE; ++AI) + for(Function::const_arg_iterator AI = TheFunction->arg_begin(), + AE = TheFunction->arg_end(); AI != AE; ++AI) createSlot(AI); SC_DEBUG("Inserting Instructions:\n"); diff --git a/lib/VMCore/Mangler.cpp b/lib/VMCore/Mangler.cpp index 69bbe261fa..14830cb8f8 100644 --- a/lib/VMCore/Mangler.cpp +++ b/lib/VMCore/Mangler.cpp @@ -121,6 +121,6 @@ Mangler::Mangler(Module &m, const char *prefix) std::map<std::string, GlobalValue*> Names; for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) InsertName(I, Names); - for (Module::giterator I = M.gbegin(), E = M.gend(); I != E; ++I) + for (Module::global_iterator I = M.global_begin(), E = M.global_end(); I != E; ++I) InsertName(I, Names); } diff --git a/lib/VMCore/Module.cpp b/lib/VMCore/Module.cpp index 0c005494e1..f9b8ca1277 100644 --- a/lib/VMCore/Module.cpp +++ b/lib/VMCore/Module.cpp @@ -286,7 +286,7 @@ void Module::dropAllReferences() { for(Module::iterator I = begin(), E = end(); I != E; ++I) I->dropAllReferences(); - for(Module::giterator I = gbegin(), E = gend(); I != E; ++I) + for(Module::global_iterator I = global_begin(), E = global_end(); I != E; ++I) I->dropAllReferences(); } diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index 1649b72058..89fd98081f 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -127,7 +127,7 @@ namespace { // Anonymous namespace for class if (I->isExternal()) visitFunction(*I); } - for (Module::giterator I = M.gbegin(), E = M.gend(); I != E; ++I) + for (Module::global_iterator I = M.global_begin(), E = M.global_end(); I != E; ++I) visitGlobalVariable(*I); // If the module is broken, abort at this time. @@ -307,7 +307,7 @@ void Verifier::visitFunction(Function &F) { // Check that the argument values match the function type for this function... unsigned i = 0; - for (Function::aiterator I = F.abegin(), E = F.aend(); I != E; ++I, ++i) { + for (Function::arg_iterator I = F.arg_begin(), E = F.arg_end(); I != E; ++I, ++i) { Assert2(I->getType() == FT->getParamType(i), "Argument value does not match function argument type!", I, FT->getParamType(i)); |