diff --git a/lib/Support/raw_ostream.cpp b/lib/Support/raw_ostream.cpp index 0fd0cdfa937..c2c55cff7ed 100644 --- a/lib/Support/raw_ostream.cpp +++ b/lib/Support/raw_ostream.cpp @@ -433,7 +433,7 @@ raw_ostream &raw_ostream::operator<<(const FormattedNumber &FN) { char *EndPtr = NumberBuffer+sizeof(NumberBuffer); char *CurPtr = EndPtr; bool Neg = (FN.DecValue < 0); - uint64_t N = Neg ? -FN.DecValue : FN.DecValue; + uint64_t N = Neg ? -static_cast(FN.DecValue) : FN.DecValue; while (N) { *--CurPtr = '0' + char(N % 10); N /= 10;