summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2013-07-16 02:43:51 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2013-07-16 02:43:51 +0000
commit59f3ff8c413c86f3b2e0a248a166281109440cae (patch)
treee62ffdb633706980790696dfbd25650985a0b230
parente7b8aa9417dee874da5fb4f9be8b1e96eb3a02f0 (diff)
downloadbcm5719-llvm-59f3ff8c413c86f3b2e0a248a166281109440cae.tar.gz
bcm5719-llvm-59f3ff8c413c86f3b2e0a248a166281109440cae.zip
Fix TimeValue::toWin32Time() to be symmetric to fromWin32Time() and compatible to Win32's FILETIME.
llvm-ar is the only user of toWin32Time() (via setLastModificationAndAccessTime), and r186298 can be reverted. It had been buggy since the initial commit. FIXME: Could we rename {from|to}Win32Time as {from|to}Win32FILETIME in TimeValue? llvm-svn: 186374
-rw-r--r--llvm/include/llvm/Support/TimeValue.h5
-rw-r--r--llvm/test/Object/extract.ll3
2 files changed, 3 insertions, 5 deletions
diff --git a/llvm/include/llvm/Support/TimeValue.h b/llvm/include/llvm/Support/TimeValue.h
index 4b48b849f20..27854088f05 100644
--- a/llvm/include/llvm/Support/TimeValue.h
+++ b/llvm/include/llvm/Support/TimeValue.h
@@ -253,9 +253,10 @@ namespace sys {
/// Converts the TimeValue into the corresponding number of "ticks" for
/// Win32 platforms, correcting for the difference in Win32 zero time.
- /// @brief Convert to windows time (seconds since 12:00:00a Jan 1, 1601)
+ /// @brief Convert to Win32's FILETIME
+ /// (100ns intervals since 00:00:00 Jan 1, 1601 UTC)
uint64_t toWin32Time() const {
- uint64_t result = seconds_ - Win32ZeroTimeSeconds;
+ uint64_t result = (uint64_t)10000000 * (seconds_ - Win32ZeroTimeSeconds);
result += nanos_ / NANOSECONDS_PER_WIN32_TICK;
return result;
}
diff --git a/llvm/test/Object/extract.ll b/llvm/test/Object/extract.ll
index ba341b8dd6e..4e519aea750 100644
--- a/llvm/test/Object/extract.ll
+++ b/llvm/test/Object/extract.ll
@@ -3,9 +3,6 @@
; This test just makes sure that llvm-ar can extract bytecode members
; from various style archives.
-; FIXME: Investigate Win32's TimeValue stuff!
-; XFAIL: mingw32
-
; REQUIRES: shell
; RUN: cd %T
OpenPOWER on IntegriCloud