diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-04 22:11:11 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-04 22:11:11 +0000 |
commit | c82ad72f63369bc462e59458f09960d66daa58a9 (patch) | |
tree | 58bc455a8d052220f9ae11e65d6f06d671a7a4c4 /lib/Support/NativeFormatting.cpp | |
parent | b915e9e0fc85ba6f398b3fab0db6a81a8913af94 (diff) |
Vendor import of llvm trunk r291012:vendor/llvm/llvm-trunk-r291012
Diffstat (limited to 'lib/Support/NativeFormatting.cpp')
-rw-r--r-- | lib/Support/NativeFormatting.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/Support/NativeFormatting.cpp b/lib/Support/NativeFormatting.cpp index bb8689141098..b951a88a38db 100644 --- a/lib/Support/NativeFormatting.cpp +++ b/lib/Support/NativeFormatting.cpp @@ -239,10 +239,7 @@ void llvm::write_double(raw_ostream &S, double N, FloatStyle Style, N *= 100.0; char Buf[32]; - unsigned Len; - Len = format(Spec.c_str(), N).snprint(Buf, sizeof(Buf)); - if (Style == FloatStyle::Percent) - ++Len; + format(Spec.c_str(), N).snprint(Buf, sizeof(Buf)); S << Buf; if (Style == FloatStyle::Percent) S << '%'; |