[llvm] r177780 - Fix comparison of mixed signedness
Hal Finkel
hfinkel at anl.gov
Fri Mar 22 17:07:29 PDT 2013
Author: hfinkel
Date: Fri Mar 22 19:07:29 2013
New Revision: 177780
URL: http://llvm.org/viewvc/llvm-project?rev=177780&view=rev
Log:
Fix comparison of mixed signedness
177774 broke the lld-x86_64-darwin11 builder; error:
error: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned long')
for (SI = 0; SI < Scavenged.size(); ++SI)
~~ ^ ~~~~~~~~~~~~~~~~
Fix this by making SI also unsigned.
Modified:
llvm/trunk/lib/CodeGen/RegisterScavenging.cpp
Modified: llvm/trunk/lib/CodeGen/RegisterScavenging.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegisterScavenging.cpp?rev=177780&r1=177779&r2=177780&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegisterScavenging.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegisterScavenging.cpp Fri Mar 22 19:07:29 2013
@@ -366,7 +366,7 @@ unsigned RegScavenger::scavengeRegister(
}
// Find an available scavenging slot.
- int SI;
+ unsigned SI;
for (SI = 0; SI < Scavenged.size(); ++SI)
if (Scavenged[SI].Reg == 0)
break;
More information about the llvm-commits
mailing list