summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-03-29 03:34:57 +0000
committerBill Wendling <isanbard@gmail.com>2012-03-29 03:34:57 +0000
commit763acfcb8aac418b789543ff3911b13fe8b6d93b (patch)
tree4af90d913df464b0a171fa42404a66032a0408d9 /llvm
parente41438ca8bf8888a3e462345c5dcc878298e97aa (diff)
downloadbcm5719-llvm-763acfcb8aac418b789543ff3911b13fe8b6d93b.tar.gz
bcm5719-llvm-763acfcb8aac418b789543ff3911b13fe8b6d93b.zip
Cache the end() iterator.
llvm-svn: 153632
Diffstat (limited to 'llvm')
-rw-r--r--llvm/tools/lto/LTOModule.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/tools/lto/LTOModule.cpp b/llvm/tools/lto/LTOModule.cpp
index 9c35fa0074e..1c06f27283b 100644
--- a/llvm/tools/lto/LTOModule.cpp
+++ b/llvm/tools/lto/LTOModule.cpp
@@ -666,7 +666,7 @@ static bool isDeclaration(const GlobalValue &V) {
/// them to either the defined or undefined lists.
bool LTOModule::parseSymbols(std::string &errMsg) {
// add functions
- for (Module::iterator f = _module->begin(); f != _module->end(); ++f) {
+ for (Module::iterator f = _module->begin(), e = _module->end(); f != e; ++f) {
if (isDeclaration(*f))
addPotentialUndefinedSymbol(f);
else
@@ -697,8 +697,8 @@ bool LTOModule::parseSymbols(std::string &errMsg) {
}
// make symbols for all undefines
- for (StringMap<NameAndAttributes>::iterator it=_undefines.begin();
- it != _undefines.end(); ++it) {
+ for (StringMap<NameAndAttributes>::iterator it=_undefines.begin(),
+ e = _undefines.end(); it != e; ++it) {
// if this symbol also has a definition, then don't make an undefine
// because it is a tentative definition
if (_defines.count(it->getKey()) == 0) {
OpenPOWER on IntegriCloud