]> granicus.if.org Git - llvm/commitdiff
Remove TimeValue usage from Scalar/SROA.cpp. NFC.
authorPavel Labath <labath@google.com>
Wed, 9 Nov 2016 12:07:12 +0000 (12:07 +0000)
committerPavel Labath <labath@google.com>
Wed, 9 Nov 2016 12:07:12 +0000 (12:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286361 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/SROA.cpp

index c834df6c73cc3e77c29e3bb7be26a3ee818eb9ee..190786691100dd7952863db004902708da6afffc 100644 (file)
 #include "llvm/IR/LLVMContext.h"
 #include "llvm/IR/Operator.h"
 #include "llvm/Pass.h"
+#include "llvm/Support/Chrono.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/Compiler.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/MathExtras.h"
-#include "llvm/Support/TimeValue.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Transforms/Scalar.h"
 #include "llvm/Transforms/Utils/Local.h"
@@ -1000,7 +1000,8 @@ AllocaSlices::AllocaSlices(const DataLayout &DL, AllocaInst &AI)
 
 #ifndef NDEBUG
   if (SROARandomShuffleSlices) {
-    std::mt19937 MT(static_cast<unsigned>(sys::TimeValue::now().msec()));
+    std::mt19937 MT(static_cast<unsigned>(
+        std::chrono::system_clock::now().time_since_epoch().count()));
     std::shuffle(Slices.begin(), Slices.end(), MT);
   }
 #endif