[llvm] r237042 - Fixing build warnings

Aaron Ballman aaron at aaronballman.com
Mon May 11 13:51:11 PDT 2015


On Mon, May 11, 2015 at 4:45 PM, Andrew Kaylor <andrew.kaylor at intel.com> wrote:
> Author: akaylor
> Date: Mon May 11 15:45:11 2015
> New Revision: 237042
>
> URL: http://llvm.org/viewvc/llvm-project?rev=237042&view=rev
> Log:
> Fixing build warnings
>
> Modified:
>     llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
>
> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp?rev=237042&r1=237041&r2=237042&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp (original)
> +++ llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp Mon May 11 15:45:11 2015
> @@ -453,7 +453,7 @@ void WinEHNumbering::processCallSite(Arr
>        auto Handlers =
>            makeArrayRef(&PoppedCatches[LastTryLowIdx], I - LastTryLowIdx + 1);
>        DEBUG(dbgs() << "createTryBlockMapEntry(" << TryLow << ", " << TryHigh);
> -      for (int J = 0; J < Handlers.size(); ++J) {
> +      for (size_t J = 0; J < Handlers.size(); ++J) {

Why not a range-based for loop with auto?

~Aaron

>          DEBUG(dbgs() << ", ");
>          print_name(Handlers[J]->getHandlerBlockOrFunc());
>        }
> @@ -481,7 +481,7 @@ void WinEHNumbering::processCallSite(Arr
>    // The handler functions may have pushed actions onto the handler stack
>    // that we expected to push here.  Compare the handler stack to our
>    // actions again to check for that possibility.
> -  if (HandlerStack.size() > FirstMismatch) {
> +  if (HandlerStack.size() > (size_t)FirstMismatch) {
>      for (int E = std::min(HandlerStack.size(), Actions.size());
>           FirstMismatch < E; ++FirstMismatch) {
>        if (HandlerStack[FirstMismatch]->getHandlerBlockOrFunc() !=
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list