summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Support/Windows/TimeValue.inc5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Support/Windows/TimeValue.inc b/llvm/lib/Support/Windows/TimeValue.inc
index 485022929b2..96f55797e53 100644
--- a/llvm/lib/Support/Windows/TimeValue.inc
+++ b/llvm/lib/Support/Windows/TimeValue.inc
@@ -49,6 +49,11 @@ std::string TimeValue::str() const {
char Buffer[25];
// FIXME: the windows version of strftime doesn't support %e
strftime(Buffer, 25, "%b %d %H:%M %Y", LT);
+ assert((Buffer[3] == ' ' && isdigit(Buffer[5]) && Buffer[6] == ' ') ||
+ "Unexpected format in strftime()!");
+ // Emulate %e on %d to mute '0'.
+ if (Buffer[4] == '0')
+ Buffer[4] = ' ';
return std::string(Buffer);
}
OpenPOWER on IntegriCloud