Use a range loop. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211986 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2014-06-28 18:44:59 +00:00
parent 8d5114e46f
commit 37f687015d

View File

@ -682,10 +682,9 @@ bool LTOModule::addAsmGlobalSymbols(std::string &errMsg) {
if (Parser->Run(false))
return true;
for (RecordStreamer::const_iterator i = Streamer->begin(),
e = Streamer->end(); i != e; ++i) {
StringRef Key = i->first();
RecordStreamer::State Value = i->second;
for (auto &KV : *Streamer) {
StringRef Key = KV.first();
RecordStreamer::State Value = KV.second;
if (Value == RecordStreamer::DefinedGlobal)
addAsmGlobalSymbol(Key.data(), LTO_SYMBOL_SCOPE_DEFAULT);
else if (Value == RecordStreamer::Defined)