[Support][Chrono] Use explicit cast of text output of time values.
authorSimon Dardis <simon.dardis@mips.com>
Mon, 6 Nov 2017 23:01:46 +0000 (23:01 +0000)
committerSimon Dardis <simon.dardis@mips.com>
Mon, 6 Nov 2017 23:01:46 +0000 (23:01 +0000)
commit8bdbff37febe7a0d0f5c59fe3714c30f2d064a24
treefdfdf9681fb0974fdd520347fd10ffc294464857
parent182f9fea37da694a25541af1dd03319091d4884f
[Support][Chrono] Use explicit cast of text output of time values.

rL316419 exposed a platform specific issue where the type of the values
passed to llvm::format could be different to the format string.

Debian unstable for mips uses long long int for std::chrono:duration,
while x86_64 uses long int.

For mips, this resulted in the value being corrupted when rendered to a
string. Address this by explicitly casting the result of the duration_cast
to the type specified in the format string.

Reviewers: sammccall

Differential Revision: https://reviews.llvm.org/D39597

llvm-svn: 317523
llvm/lib/Support/Chrono.cpp