mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-23 02:29:18 +00:00
Cache the end() iterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153632 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f75f4271f4
commit
9f3b483b81
@ -666,7 +666,7 @@ static bool isDeclaration(const GlobalValue &V) {
|
|||||||
/// them to either the defined or undefined lists.
|
/// them to either the defined or undefined lists.
|
||||||
bool LTOModule::parseSymbols(std::string &errMsg) {
|
bool LTOModule::parseSymbols(std::string &errMsg) {
|
||||||
// add functions
|
// 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))
|
if (isDeclaration(*f))
|
||||||
addPotentialUndefinedSymbol(f);
|
addPotentialUndefinedSymbol(f);
|
||||||
else
|
else
|
||||||
@ -697,8 +697,8 @@ bool LTOModule::parseSymbols(std::string &errMsg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// make symbols for all undefines
|
// make symbols for all undefines
|
||||||
for (StringMap<NameAndAttributes>::iterator it=_undefines.begin();
|
for (StringMap<NameAndAttributes>::iterator it=_undefines.begin(),
|
||||||
it != _undefines.end(); ++it) {
|
e = _undefines.end(); it != e; ++it) {
|
||||||
// if this symbol also has a definition, then don't make an undefine
|
// if this symbol also has a definition, then don't make an undefine
|
||||||
// because it is a tentative definition
|
// because it is a tentative definition
|
||||||
if (_defines.count(it->getKey()) == 0) {
|
if (_defines.count(it->getKey()) == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user