[llvm] r237042 - Fixing build warnings

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


On Mon, May 11, 2015 at 4:53 PM, Kaylor, Andrew <andrew.kaylor at intel.com> wrote:
>>> 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?
>
> Mostly because I was copying similar code in the same function.

Slight preference for moving code forward when doing these sort of
minor fixups, but not a huge issue either way.

~Aaron



More information about the llvm-commits mailing list