fix a couple -Wsign-compare warnings.
authorChris Lattner <sabre@nondot.org>
Thu, 14 Apr 2011 02:27:25 +0000 (02:27 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 14 Apr 2011 02:27:25 +0000 (02:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129501 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/LoopUnrollPass.cpp

index 8d925bcbddaf1e3aa10955cdab16c2b4253970c9..fef6bc31c7b660511b7883ea8a4dfe2e603dab60 100644 (file)
@@ -44,8 +44,8 @@ namespace {
   public:
     static char ID; // Pass ID, replacement for typeid
     LoopUnroll(int T = -1, int C = -1,  int P = -1) : LoopPass(ID) {
-      CurrentThreshold = (T == -1) ? UnrollThreshold : T;
-      CurrentCount = (C == -1) ? UnrollCount : C;
+      CurrentThreshold = (T == -1) ? UnrollThreshold : unsigned(T);
+      CurrentCount = (C == -1) ? UnrollCount : unsigned(C);
       CurrentAllowPartial = (P == -1) ? UnrollAllowPartial : (bool)P;
 
       UserThreshold = (T != -1) || (UnrollThreshold.getNumOccurrences() > 0);