mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-23 17:29:19 +00:00
Rangify two for loops in BitcodeReader.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239627 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
51be69023d
commit
923bd1da56
@ -2690,20 +2690,15 @@ std::error_code BitcodeReader::GlobalCleanup() {
|
|||||||
return Error("Malformed global initializer set");
|
return Error("Malformed global initializer set");
|
||||||
|
|
||||||
// Look for intrinsic functions which need to be upgraded at some point
|
// Look for intrinsic functions which need to be upgraded at some point
|
||||||
for (Module::iterator FI = TheModule->begin(), FE = TheModule->end();
|
for (Function &F : *TheModule) {
|
||||||
FI != FE; ++FI) {
|
|
||||||
Function *NewFn;
|
Function *NewFn;
|
||||||
if (UpgradeIntrinsicFunction(FI, NewFn))
|
if (UpgradeIntrinsicFunction(&F, NewFn))
|
||||||
UpgradedIntrinsics.push_back(std::make_pair(FI, NewFn));
|
UpgradedIntrinsics.push_back(std::make_pair(&F, NewFn));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Look for global variables which need to be renamed.
|
// Look for global variables which need to be renamed.
|
||||||
for (Module::global_iterator
|
for (GlobalVariable &GV : TheModule->globals())
|
||||||
GI = TheModule->global_begin(), GE = TheModule->global_end();
|
UpgradeGlobalVariable(&GV);
|
||||||
GI != GE;) {
|
|
||||||
GlobalVariable *GV = GI++;
|
|
||||||
UpgradeGlobalVariable(GV);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Force deallocation of memory for these vectors to favor the client that
|
// Force deallocation of memory for these vectors to favor the client that
|
||||||
// want lazy deserialization.
|
// want lazy deserialization.
|
||||||
|
Loading…
Reference in New Issue
Block a user