[llvm-commits] [llvm] r141807 - /llvm/trunk/lib/MC/MCContext.cpp
Nick Lewycky
nicholas at mxc.ca
Wed Oct 12 13:20:48 PDT 2011
Author: nicholas
Date: Wed Oct 12 15:20:48 2011
New Revision: 141807
URL: http://llvm.org/viewvc/llvm-project?rev=141807&view=rev
Log:
Hoist vector.size() computation out of the loop. No functionality change.
Modified:
llvm/trunk/lib/MC/MCContext.cpp
Modified: llvm/trunk/lib/MC/MCContext.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCContext.cpp?rev=141807&r1=141806&r2=141807&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCContext.cpp (original)
+++ llvm/trunk/lib/MC/MCContext.cpp Wed Oct 12 15:20:48 2011
@@ -279,7 +279,8 @@
} 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;
}
More information about the llvm-commits
mailing list