llvm.org GIT mirror llvm / 9f3b483
Cache the end() iterator. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153632 91177308-0d34-0410-b5e6-96231b3b80d8 Bill Wendling 7 years ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
665665 /// them to either the defined or undefined lists.
666666 bool LTOModule::parseSymbols(std::string &errMsg) {
667667 // add functions
668 for (Module::iterator f = _module->begin(); f != _module->end(); ++f) {
668 for (Module::iterator f = _module->begin(), e = _module->end(); f != e; ++f) {
669669 if (isDeclaration(*f))
670670 addPotentialUndefinedSymbol(f);
671671 else
696696 }
697697
698698 // make symbols for all undefines
699 for (StringMap::iterator it=_undefines.begin();
700 it != _undefines.end(); ++it) {
699 for (StringMap::iterator it=_undefines.begin(),
700 e = _undefines.end(); it != e; ++it) {
701701 // if this symbol also has a definition, then don't make an undefine
702702 // because it is a tentative definition
703703 if (_defines.count(it->getKey()) == 0) {