diff options
65 files changed, 185 insertions, 185 deletions
diff --git a/lib/Analysis/AliasAnalysisEvaluator.cpp b/lib/Analysis/AliasAnalysisEvaluator.cpp index bf979635ee..7c8ccb6c62 100644 --- a/lib/Analysis/AliasAnalysisEvaluator.cpp +++ b/lib/Analysis/AliasAnalysisEvaluator.cpp @@ -102,7 +102,7 @@ bool AAEval::runOnFunction(Function &F) { std::set<Value *> Pointers; std::set<CallSite> CallSites; - for (Function::aiterator I = F.abegin(), E = F.aend(); I != E; ++I) + for (Function::arg_iterator I = F.arg_begin(), E = F.arg_end(); I != E; ++I) if (isa<PointerType>(I->getType())) // Add all pointer arguments Pointers.insert(I); diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp index a94e083da3..ac2abb308b 100644 --- a/lib/Analysis/DataStructure/DataStructure.cpp +++ b/lib/Analysis/DataStructure/DataStructure.cpp @@ -1270,7 +1270,7 @@ static bool PathExistsToClonedNode(const DSCallSite &CS, void DSGraph::getFunctionArgumentsForCall(Function *F, std::vector<DSNodeHandle> &Args) const { Args.push_back(getReturnNodeFor(*F)); - for (Function::aiterator AI = F->abegin(), E = F->aend(); AI != E; ++AI) + for (Function::arg_iterator AI = F->arg_begin(), E = F->arg_end(); AI != E; ++AI) if (isPointerType(AI->getType())) { Args.push_back(getNodeForValue(AI)); assert(!Args.back().isNull() && "Pointer argument w/o scalarmap entry!?"); @@ -1405,7 +1405,7 @@ void DSGraph::mergeInGraph(const DSCallSite &CS, Function &F, DSCallSite DSGraph::getCallSiteForArguments(Function &F) const { std::vector<DSNodeHandle> Args; - for (Function::aiterator I = F.abegin(), E = F.aend(); I != E; ++I) + for (Function::arg_iterator I = F.arg_begin(), E = F.arg_end(); I != E; ++I) if (isPointerType(I->getType())) Args.push_back(getNodeForValue(I)); @@ -1482,7 +1482,7 @@ void DSGraph::markIncompleteNodes(unsigned Flags) { for (ReturnNodesTy::iterator FI = ReturnNodes.begin(), E =ReturnNodes.end(); FI != E; ++FI) { Function &F = *FI->first; - for (Function::aiterator I = F.abegin(), E = F.aend(); I != E; ++I) + for (Function::arg_iterator I = F.arg_begin(), E = F.arg_end(); I != E; ++I) if (isPointerType(I->getType())) markIncompleteNode(getNodeForValue(I).getNode()); markIncompleteNode(FI->second.getNode()); @@ -2038,7 +2038,7 @@ void DSGraph::AssertGraphOK() const { E = ReturnNodes.end(); RI != E; ++RI) { Function &F = *RI->first; - for (Function::aiterator AI = F.abegin(); AI != F.aend(); ++AI) + for (Function::arg_iterator AI = F.arg_begin(); AI != F.arg_end(); ++AI) if (isPointerType(AI->getType())) assert(!getNodeForValue(AI).isNull() && "Pointer argument must be in the scalar map!"); diff --git a/lib/Analysis/DataStructure/DataStructureOpt.cpp b/lib/Analysis/DataStructure/DataStructureOpt.cpp index 1d8373a01d..c75784b964 100644 --- a/lib/Analysis/DataStructure/DataStructureOpt.cpp +++ b/lib/Analysis/DataStructure/DataStructureOpt.cpp @@ -59,7 +59,7 @@ bool DSOpt::OptimizeGlobals(Module &M) { const DSGraph::ScalarMapTy &SM = GG.getScalarMap(); bool Changed = false; - 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) if (!I->isExternal()) { // Loop over all of the non-external globals... // Look up the node corresponding to this global, if it exists. DSNode *GNode = 0; diff --git a/lib/Analysis/DataStructure/EquivClassGraphs.cpp b/lib/Analysis/DataStructure/EquivClassGraphs.cpp index 4ada4dcca5..ef1e01aae4 100644 --- a/lib/Analysis/DataStructure/EquivClassGraphs.cpp +++ b/lib/Analysis/DataStructure/EquivClassGraphs.cpp @@ -215,7 +215,7 @@ void EquivClassGraphs::buildIndirectFunctionSets(Module &M) { // Record the argument nodes for use in merging later below. std::vector<DSNodeHandle> ArgNodes; - for (Function::aiterator AI1 = LF->abegin(); AI1 != LF->aend(); ++AI1) + for (Function::arg_iterator AI1 = LF->arg_begin(); AI1 != LF->arg_end(); ++AI1) if (DS::isPointerType(AI1->getType())) ArgNodes.push_back(MergedG.getNodeForValue(AI1)); @@ -254,7 +254,7 @@ void EquivClassGraphs::buildIndirectFunctionSets(Module &M) { // Merge the function arguments with all argument nodes found so far. // If there are extra function args, add them to the vector of argNodes - Function::aiterator AI2 = F->abegin(), AI2end = F->aend(); + Function::arg_iterator AI2 = F->arg_begin(), AI2end = F->arg_end(); for (unsigned arg=0, numArgs = ArgNodes.size(); arg != numArgs && AI2 != AI2end; ++AI2, ++arg) if (DS::isPointerType(AI2->getType())) diff --git a/lib/Analysis/DataStructure/Local.cpp b/lib/Analysis/DataStructure/Local.cpp index 20f45a7b27..e2e40f76d2 100644 --- a/lib/Analysis/DataStructure/Local.cpp +++ b/lib/Analysis/DataStructure/Local.cpp @@ -82,7 +82,7 @@ namespace { FunctionCalls(&fc) { // Create scalar nodes for all pointer arguments... - for (Function::aiterator I = f.abegin(), E = f.aend(); I != E; ++I) + for (Function::arg_iterator I = f.arg_begin(), E = f.arg_end(); I != E; ++I) if (isPointerType(I->getType())) getValueDest(*I); @@ -1076,7 +1076,7 @@ bool LocalDataStructures::runOnModule(Module &M) { GraphBuilder GGB(*GlobalsGraph); // Add initializers for all of the globals to the globals graph... - 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) if (!I->isExternal()) GGB.mergeInGlobalInitializer(I); } diff --git a/lib/Analysis/DataStructure/Steensgaard.cpp b/lib/Analysis/DataStructure/Steensgaard.cpp index eee9b0b6f9..dd07ee6f82 100644 --- a/lib/Analysis/DataStructure/Steensgaard.cpp +++ b/lib/Analysis/DataStructure/Steensgaard.cpp @@ -94,7 +94,7 @@ void Steens::ResolveFunctionCall(Function *F, const DSCallSite &Call, // Loop over all pointer arguments, resolving them to their provided pointers unsigned PtrArgIdx = 0; - for (Function::aiterator AI = F->abegin(), AE = F->aend(); + for (Function::arg_iterator AI = F->arg_begin(), AE = F->arg_end(); AI != AE && PtrArgIdx < Call.getNumPtrArgs(); ++AI) { DSGraph::ScalarMapTy::iterator I = ValMap.find(AI); if (I != ValMap.end()) // If its a pointer argument... diff --git a/lib/Analysis/IPA/Andersens.cpp b/lib/Analysis/IPA/Andersens.cpp index b8553e6743..12d4cf5d4c 100644 --- a/lib/Analysis/IPA/Andersens.cpp +++ b/lib/Analysis/IPA/Andersens.cpp @@ -433,7 +433,7 @@ void Andersens::IdentifyObjects(Module &M) { ++NumObjects; // Add all the globals first. - 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) { ObjectNodes[I] = NumObjects++; ValueNodes[I] = NumObjects++; } @@ -449,7 +449,7 @@ void Andersens::IdentifyObjects(Module &M) { VarargNodes[F] = NumObjects++; // Add nodes for all of the incoming pointer arguments. - for (Function::aiterator I = F->abegin(), E = F->aend(); I != E; ++I) + for (Function::arg_iterator I = F->arg_begin(), E = F->arg_end(); I != E; ++I) if (isa<PointerType>(I->getType())) ValueNodes[I] = NumObjects++; @@ -550,7 +550,7 @@ void Andersens::AddGlobalInitializerConstraints(Node *N, Constant *C) { } void Andersens::AddConstraintsForNonInternalLinkage(Function *F) { - for (Function::aiterator I = F->abegin(), E = F->aend(); I != E; ++I) + for (Function::arg_iterator I = F->arg_begin(), E = F->arg_end(); I != E; ++I) if (isa<PointerType>(I->getType())) // If this is an argument of an externally accessible function, the // incoming pointer might point to anything. @@ -571,7 +571,7 @@ void Andersens::CollectConstraints(Module &M) { GraphNodes[NullPtr].addPointerTo(&GraphNodes[NullObject]); // Next, add any constraints on global variables and their initializers. - 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) { // Associate the address of the global object as pointing to the memory for // the global: &G = <G memory> Node *Object = getObject(I); @@ -599,7 +599,7 @@ void Andersens::CollectConstraints(Module &M) { getVarargNode(F)->setValue(F); // Set up incoming argument nodes. - for (Function::aiterator I = F->abegin(), E = F->aend(); I != E; ++I) + for (Function::arg_iterator I = F->arg_begin(), E = F->arg_end(); I != E; ++I) if (isa<PointerType>(I->getType())) getNodeValue(*I); @@ -620,7 +620,7 @@ void Andersens::CollectConstraints(Module &M) { // Any pointers that are passed into the function have the universal set // stored into them. - for (Function::aiterator I = F->abegin(), E = F->aend(); I != E; ++I) + for (Function::arg_iterator I = F->arg_begin(), E = F->arg_end(); I != E; ++I) if (isa<PointerType>(I->getType())) { // Pointers passed into external functions could have anything stored // through them. @@ -772,7 +772,7 @@ void Andersens::AddConstraintsForCall(CallSite CS, Function *F) { getReturnNode(F))); } - Function::aiterator AI = F->abegin(), AE = F->aend(); + Function::arg_iterator AI = F->arg_begin(), AE = F->arg_end(); CallSite::arg_iterator ArgI = CS.arg_begin(), ArgE = CS.arg_end(); for (; AI != AE && ArgI != ArgE; ++AI, ++ArgI) if (isa<PointerType>(AI->getType())) { diff --git a/lib/Analysis/IPA/FindUsedTypes.cpp b/lib/Analysis/IPA/FindUsedTypes.cpp index cb6b05ca4e..e37a40ac66 100644 --- a/lib/Analysis/IPA/FindUsedTypes.cpp +++ b/lib/Analysis/IPA/FindUsedTypes.cpp @@ -62,7 +62,7 @@ bool FindUsedTypes::runOnModule(Module &m) { UsedTypes.clear(); // reset if run multiple times... // Loop over global variables, incorporating their types - 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) { IncorporateType(I->getType()); if (I->hasInitializer()) IncorporateValue(I->getInitializer()); diff --git a/lib/Analysis/IPA/GlobalsModRef.cpp b/lib/Analysis/IPA/GlobalsModRef.cpp index 4a97a8f037..6bf2698988 100644 --- a/lib/Analysis/IPA/GlobalsModRef.cpp +++ b/lib/Analysis/IPA/GlobalsModRef.cpp @@ -159,7 +159,7 @@ void GlobalsModRef::AnalyzeGlobals(Module &M) { Readers.clear(); Writers.clear(); } - 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) if (I->hasInternalLinkage()) { if (!AnalyzeUsesOfGlobal(I, Readers, Writers)) { // Remember that we are tracking this global, and the mod/ref fns diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y index 9da63641b2..eb79350eed 100644 --- a/lib/AsmParser/llvmAsmParser.y +++ b/lib/AsmParser/llvmAsmParser.y @@ -759,7 +759,7 @@ Module *llvm::RunVMAsmParser(const std::string &Filename, FILE *F) { // Check to see if they called va_start but not va_arg.. if (!ObsoleteVarArgs) if (Function *F = Result->getNamedFunction("llvm.va_start")) - if (F->asize() == 1) { + if (F->arg_size() == 1) { std::cerr << "WARNING: this file uses obsolete features. " << "Assemble and disassemble to update it.\n"; ObsoleteVarArgs = true; @@ -769,7 +769,7 @@ Module *llvm::RunVMAsmParser(const std::string &Filename, FILE *F) { // If the user is making use of obsolete varargs intrinsics, adjust them for // the user. if (Function *F = Result->getNamedFunction("llvm.va_start")) { - assert(F->asize() == 1 && "Obsolete va_start takes 1 argument!"); + assert(F->arg_size() == 1 && "Obsolete va_start takes 1 argument!"); const Type *RetTy = F->getFunctionType()->getParamType(0); RetTy = cast<PointerType>(RetTy)->getElementType(); @@ -785,7 +785,7 @@ Module *llvm::RunVMAsmParser(const std::string &Filename, FILE *F) { } if (Function *F = Result->getNamedFunction("llvm.va_end")) { - assert(F->asize() == 1 && "Obsolete va_end takes 1 argument!"); + assert(F->arg_size() == 1 && "Obsolete va_end takes 1 argument!"); const Type *ArgTy = F->getFunctionType()->getParamType(0); ArgTy = cast<PointerType>(ArgTy)->getElementType(); Function *NF = Result->getOrInsertFunction("llvm.va_end", Type::VoidTy, @@ -801,7 +801,7 @@ Module *llvm::RunVMAsmParser(const std::string &Filename, FILE *F) { } if (Function *F = Result->getNamedFunction("llvm.va_copy")) { - assert(F->asize() == 2 && "Obsolete va_copy takes 2 argument!"); + assert(F->arg_size() == 2 && "Obsolete va_copy takes 2 argument!"); const Type *ArgTy = F->getFunctionType()->getParamType(0); ArgTy = cast<PointerType>(ArgTy)->getElementType(); Function *NF = Result->getOrInsertFunction("llvm.va_copy", ArgTy, @@ -1623,7 +1623,7 @@ FunctionHeaderH : TypesV Name '(' ArgList ')' { // Make sure to strip off any argument names so we can't get conflicts. if (Fn->isExternal()) - for (Function::aiterator AI = Fn->abegin(), AE = Fn->aend(); + for (Function::arg_iterator AI = Fn->arg_begin(), AE = Fn->arg_end(); AI != AE; ++AI) AI->setName(""); @@ -1643,7 +1643,7 @@ FunctionHeaderH : TypesV Name '(' ArgList ')' { delete $4->back().first; $4->pop_back(); // Delete the last entry } - Function::aiterator ArgIt = Fn->abegin(); + Function::arg_iterator ArgIt = Fn->arg_begin(); for (std::vector<std::pair<PATypeHolder*, char*> >::iterator I =$4->begin(); I != $4->end(); ++I, ++ArgIt) { delete I->first; // Delete the typeholder... diff --git a/lib/Bytecode/Reader/Reader.cpp b/lib/Bytecode/Reader/Reader.cpp index 7eede0e1d4..974a3263aa 100644 --- a/lib/Bytecode/Reader/Reader.cpp +++ b/lib/Bytecode/Reader/Reader.cpp @@ -536,7 +536,7 @@ unsigned BytecodeReader::insertValue(Value *Val, unsigned type, /// Insert the arguments of a function as new values in the reader. void BytecodeReader::insertArguments(Function* F) { const FunctionType *FT = F->getFunctionType(); - Function::aiterator AI = F->abegin(); + Function::arg_iterator AI = F->arg_begin(); for (FunctionType::param_iterator It = FT->param_begin(); It != FT->param_end(); ++It, ++AI) insertValue(AI, getTypeSlot(AI->getType()), FunctionValues); diff --git a/lib/Bytecode/Reader/ReaderWrappers.cpp b/lib/Bytecode/Reader/ReaderWrappers.cpp index 449bf86381..086409edc8 100644 --- a/lib/Bytecode/Reader/ReaderWrappers.cpp +++ b/lib/Bytecode/Reader/ReaderWrappers.cpp @@ -171,7 +171,7 @@ static ModuleProvider *CheckVarargs(ModuleProvider *MP) { // If the user is making use of obsolete varargs intrinsics, adjust them for // the user. if (Function *F = M->getNamedFunction("llvm.va_start")) { - assert(F->asize() == 1 && "Obsolete va_start takes 1 argument!"); + assert(F->arg_size() == 1 && "Obsolete va_start takes 1 argument!"); const Type *RetTy = F->getFunctionType()->getParamType(0); RetTy = cast<PointerType>(RetTy)->getElementType(); @@ -187,7 +187,7 @@ static ModuleProvider *CheckVarargs(ModuleProvider *MP) { } if (Function *F = M->getNamedFunction("llvm.va_end")) { - assert(F->asize() == 1 && "Obsolete va_end takes 1 argument!"); + assert(F->arg_size() == 1 && "Obsolete va_end takes 1 argument!"); const Type *ArgTy = F->getFunctionType()->getParamType(0); ArgTy = cast<PointerType>(ArgTy)->getElementType(); Function *NF = M->getOrInsertFunction("llvm.va_end", Type::VoidTy, @@ -203,7 +203,7 @@ static ModuleProvider *CheckVarargs(ModuleProvider *MP) { } if (Function *F = M->getNamedFunction("llvm.va_copy")) { - assert(F->asize() == 2 && "Obsolete va_copy takes 2 argument!"); + assert(F->arg_size() == 2 && "Obsolete va_copy takes 2 argument!"); const Type *ArgTy = F->getFunctionType()->getParamType(0); ArgTy = cast<PointerType>(ArgTy)->getElementType(); Function *NF = M->getOrInsertFunction("llvm.va_copy", ArgTy, @@ -330,7 +330,7 @@ bool llvm::GetBytecodeDependentLibraries(const std::string &fname, static void getSymbols(Module*M, std::vector<std::string>& symbols) { // Loop over global variables - for (Module::giterator GI = M->gbegin(), GE=M->gend(); GI != GE; ++GI) + for (Module::global_iterator GI = M->global_begin(), GE=M->global_end(); GI != GE; ++GI) if (!GI->isExternal() && !GI->hasInternalLinkage()) if (!GI->getName().empty()) symbols.push_back(GI->getName()); diff --git a/lib/Bytecode/Writer/SlotCalculator.cpp b/lib/Bytecode/Writer/SlotCalculator.cpp index 4a95c7b80f..d1af03eae4 100644 --- a/lib/Bytecode/Writer/SlotCalculator.cpp +++ b/lib/Bytecode/Writer/SlotCalculator.cpp @@ -121,7 +121,7 @@ void SlotCalculator::processModule() { // 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) getOrCreateSlot(I); @@ -134,7 +134,7 @@ void SlotCalculator::processModule() { // Add all of the module level constants used as initializers // - 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) if (I->hasInitializer()) getOrCreateSlot(I->getInitializer()); @@ -285,7 +285,7 @@ void SlotCalculator::incorporateFunction(const Function *F) { ModuleTypeLevel = Types.size(); // Iterate over function arguments, adding them to the value table... - 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) getOrCreateSlot(I); if ( !ModuleContainsAllFunctionConstants ) { @@ -461,7 +461,7 @@ void SlotCalculator::buildCompactionTable(const Function *F) { } // Next, include any types used by function arguments. - 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) getOrCreateCompactionTableSlot(I->getType()); // Next, find all of the types and values that are referred to by the diff --git a/lib/Bytecode/Writer/Writer.cpp b/lib/Bytecode/Writer/Writer.cpp index 9862391b3a..dcee8be320 100644 --- a/lib/Byt |