Hoist vector.size() computation out of the loop. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141807 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nick Lewycky 2011-10-12 20:20:48 +00:00
parent b0786b33fa
commit 18ad76bb9a

View File

@ -279,7 +279,8 @@ unsigned MCContext::GetDwarfFile(StringRef FileName, unsigned FileNumber) {
} else {
StringRef Directory = Slash.first;
Name = Slash.second;
for (DirIndex = 0; DirIndex < MCDwarfDirs.size(); DirIndex++) {
DirIndex = 0;
for (unsigned End = MCDwarfDirs.size(); DirIndex < End; DirIndex++) {
if (Directory == MCDwarfDirs[DirIndex])
break;
}