[Attributor][FIX] Silence sign-compare warning
authorJohannes Doerfert <jdoerfert@anl.gov>
Mon, 21 Oct 2019 01:29:10 +0000 (01:29 +0000)
committerJohannes Doerfert <jdoerfert@anl.gov>
Mon, 21 Oct 2019 01:29:10 +0000 (01:29 +0000)
llvm-svn: 375384

llvm/lib/Transforms/IPO/Attributor.cpp

index e7b7404..95f4734 100644 (file)
@@ -2994,7 +2994,7 @@ struct AANoCaptureImpl : public AANoCapture {
     if (F.doesNotThrow() && ArgNo >= 0) {
       for (unsigned u = 0, e = F.arg_size(); u< e; ++u)
         if (F.hasParamAttribute(u, Attribute::Returned)) {
-          if (u == ArgNo)
+          if (u == unsigned(ArgNo))
             State.removeAssumedBits(NOT_CAPTURED_IN_RET);
           else if (F.onlyReadsMemory())
             State.addKnownBits(NO_CAPTURE);