diff options
| author | 2017-01-24 08:39:00 +0000 | |
|---|---|---|
| committer | 2017-01-24 08:39:00 +0000 | |
| commit | 78b306486612785150cf0fa168c56d015802182a (patch) | |
| tree | fb9db7510c6eba1d7eeacca99246eb577635ee28 /gnu/llvm/lib/Support/TimeValue.cpp | |
| parent | Import LLVM 4.0.0 rc1 including clang and lld to help the current (diff) | |
| download | wireguard-openbsd-78b306486612785150cf0fa168c56d015802182a.tar.xz wireguard-openbsd-78b306486612785150cf0fa168c56d015802182a.zip | |
Merge LLVM 4.0.0 rc1
Diffstat (limited to 'gnu/llvm/lib/Support/TimeValue.cpp')
| -rw-r--r-- | gnu/llvm/lib/Support/TimeValue.cpp | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/gnu/llvm/lib/Support/TimeValue.cpp b/gnu/llvm/lib/Support/TimeValue.cpp deleted file mode 100644 index 94a4c011693..00000000000 --- a/gnu/llvm/lib/Support/TimeValue.cpp +++ /dev/null @@ -1,56 +0,0 @@ -//===-- TimeValue.cpp - Implement OS TimeValue Concept ----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements the operating system TimeValue concept. -// -//===----------------------------------------------------------------------===// - -#include "llvm/Support/TimeValue.h" -#include "llvm/Config/config.h" - -namespace llvm { - -using namespace sys; - -const TimeValue::SecondsType - TimeValue::PosixZeroTimeSeconds = -946684800; -const TimeValue::SecondsType - TimeValue::Win32ZeroTimeSeconds = -12591158400ULL; - -void TimeValue::normalize() { - if ( nanos_ >= NANOSECONDS_PER_SECOND ) { - do { - seconds_++; - nanos_ -= NANOSECONDS_PER_SECOND; - } while ( nanos_ >= NANOSECONDS_PER_SECOND ); - } else if (nanos_ <= -NANOSECONDS_PER_SECOND ) { - do { - seconds_--; - nanos_ += NANOSECONDS_PER_SECOND; - } while (nanos_ <= -NANOSECONDS_PER_SECOND); - } - - if (seconds_ >= 1 && nanos_ < 0) { - seconds_--; - nanos_ += NANOSECONDS_PER_SECOND; - } else if (seconds_ < 0 && nanos_ > 0) { - seconds_++; - nanos_ -= NANOSECONDS_PER_SECOND; - } -} - -} // namespace llvm - -/// Include the platform-specific portion of TimeValue class -#ifdef LLVM_ON_UNIX -#include "Unix/TimeValue.inc" -#endif -#ifdef LLVM_ON_WIN32 -#include "Windows/TimeValue.inc" -#endif |
