This is an archive of the discontinued LLVM Phabricator instance.

[Support][Chrono] Use explicit cast of text output of time values.
ClosedPublic

Authored by sdardis on Nov 3 2017, 7:19 AM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

sdardis created this revision.Nov 3 2017, 7:19 AM
sammccall accepted this revision.Nov 6 2017, 9:16 AM

Oh, good catch! Thanks for looking into this, and sorry for the bad diagnosis.

This revision is now accepted and ready to land.Nov 6 2017, 9:16 AM
This revision was automatically updated to reflect the committed changes.