[llvm-commits] [llvm] r77444 - /llvm/trunk/lib/Support/raw_ostream.cpp

Daniel Dunbar daniel at zuster.org
Wed Jul 29 10:24:43 PDT 2009


Yup, will fix, thanks!

 - Daniel

On Wed, Jul 29, 2009 at 9:56 AM, Reid Kleckner<rnk at mit.edu> wrote:
> On Tue, Jul 28, 2009 at 11:45 PM, Daniel Dunbar<daniel at zuster.org> wrote:
>> Author: ddunbar
>> Date: Wed Jul 29 01:45:14 2009
>> New Revision: 77444
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=77444&view=rev
>> Log:
>> raw_ostream: Follow the 32-bit path when printing "small" decimal numbers.
>>
>> Modified:
>>    llvm/trunk/lib/Support/raw_ostream.cpp
>>
>> Modified: llvm/trunk/lib/Support/raw_ostream.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/raw_ostream.cpp?rev=77444&r1=77443&r2=77444&view=diff
>>
>> ==============================================================================
>> --- llvm/trunk/lib/Support/raw_ostream.cpp (original)
>> +++ llvm/trunk/lib/Support/raw_ostream.cpp Wed Jul 29 01:45:14 2009
>> @@ -89,6 +89,10 @@
>>  }
>>
>>  raw_ostream &raw_ostream::operator<<(unsigned long long N) {
>> +  // Output using 32-bit div/mod when possible.
>> +  if (N == static_cast<unsigned long>(N))
>> +    return this->operator<<(static_cast<unsigned long>(N));
>> +
>>   // Zero is a special case.
>>   if (N == 0)
>>     return *this << '0';
>
> Doesn't the 'if (N == 0)' become dead code with this change?
>
> Reid
>
> _______________________________________________
> 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