diff options
author | Yaron Keren <yaron.keren@gmail.com> | 2015-06-12 18:13:20 +0000 |
---|---|---|
committer | Yaron Keren <yaron.keren@gmail.com> | 2015-06-12 18:13:20 +0000 |
commit | ef5e7addb3df91285aa22d6165652e0f3bdabd5f (patch) | |
tree | 60ed95da58f171427c6bbda8e9619c3e3bf15d02 /llvm/lib/Bitcode | |
parent | 83a930c80b6b34b56f06436ed56a680120ff88f9 (diff) | |
download | bcm5719-llvm-ef5e7addb3df91285aa22d6165652e0f3bdabd5f.tar.gz bcm5719-llvm-ef5e7addb3df91285aa22d6165652e0f3bdabd5f.zip |
Rangify two for loops in BitcodeReader.cpp.
llvm-svn: 239627
Diffstat (limited to 'llvm/lib/Bitcode')
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index 056d87beef1..23e9e379b03 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -2690,20 +2690,15 @@ std::error_code BitcodeReader::GlobalCleanup() { return Error("Malformed global initializer set"); // Look for intrinsic functions which need to be upgraded at some point - for (Module::iterator FI = TheModule->begin(), FE = TheModule->end(); - FI != FE; ++FI) { + for (Function &F : *TheModule) { Function *NewFn; - if (UpgradeIntrinsicFunction(FI, NewFn)) - UpgradedIntrinsics.push_back(std::make_pair(FI, NewFn)); + if (UpgradeIntrinsicFunction(&F, NewFn)) + UpgradedIntrinsics.push_back(std::make_pair(&F, NewFn)); } // Look for global variables which need to be renamed. - for (Module::global_iterator - GI = TheModule->global_begin(), GE = TheModule->global_end(); - GI != GE;) { - GlobalVariable *GV = GI++; - UpgradeGlobalVariable(GV); - } + for (GlobalVariable &GV : TheModule->globals()) + UpgradeGlobalVariable(&GV); // Force deallocation of memory for these vectors to favor the client that // want lazy deserialization. |