Use range loops and add missing braces.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233598 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2015-03-30 21:18:36 +00:00
parent 454c320c6e
commit 37780d81b1

View File

@ -978,16 +978,16 @@ bool llvm::StripDebugInfo(Module &M) {
}
}
for (Module::iterator MI = M.begin(), ME = M.end(); MI != ME; ++MI)
for (Function::iterator FI = MI->begin(), FE = MI->end(); FI != FE;
++FI)
for (BasicBlock::iterator BI = FI->begin(), BE = FI->end(); BI != BE;
++BI) {
if (BI->getDebugLoc()) {
for (Function &F : M) {
for (BasicBlock &BB : F) {
for (Instruction &I : BB) {
if (I.getDebugLoc()) {
Changed = true;
BI->setDebugLoc(DebugLoc());
I.setDebugLoc(DebugLoc());
}
}
}
}
return Changed;
}