diff options
| author | 2019-01-27 16:42:12 +0000 | |
|---|---|---|
| committer | 2019-01-27 16:42:12 +0000 | |
| commit | b773203fb58f3ef282fb69c832d8710cab5bc82d (patch) | |
| tree | e75913f147570fbd75169647b144df85b88a038c /gnu/llvm/lib/Support/RandomNumberGenerator.cpp | |
| parent | tweak errno in previous (diff) | |
| download | wireguard-openbsd-b773203fb58f3ef282fb69c832d8710cab5bc82d.tar.xz wireguard-openbsd-b773203fb58f3ef282fb69c832d8710cab5bc82d.zip | |
Import LLVM 7.0.1 release including clang, lld and lldb.
Diffstat (limited to 'gnu/llvm/lib/Support/RandomNumberGenerator.cpp')
| -rw-r--r-- | gnu/llvm/lib/Support/RandomNumberGenerator.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gnu/llvm/lib/Support/RandomNumberGenerator.cpp b/gnu/llvm/lib/Support/RandomNumberGenerator.cpp index 47d20159200..f1f22af82a8 100644 --- a/gnu/llvm/lib/Support/RandomNumberGenerator.cpp +++ b/gnu/llvm/lib/Support/RandomNumberGenerator.cpp @@ -17,7 +17,7 @@ #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" -#ifdef LLVM_ON_WIN32 +#ifdef _WIN32 #include "Windows/WindowsSupport.h" #else #include "Unix/Unix.h" @@ -36,10 +36,8 @@ static cl::opt<unsigned long long> cl::desc("Seed for the random number generator"), cl::init(0)); RandomNumberGenerator::RandomNumberGenerator(StringRef Salt) { - DEBUG( - if (Seed == 0) - dbgs() << "Warning! Using unseeded random number generator.\n" - ); + LLVM_DEBUG(if (Seed == 0) dbgs() + << "Warning! Using unseeded random number generator.\n"); // Combine seed and salts using std::seed_seq. // Data: Seed-low, Seed-high, Salt @@ -63,7 +61,7 @@ RandomNumberGenerator::result_type RandomNumberGenerator::operator()() { // Get random vector of specified size std::error_code llvm::getRandomBytes(void *Buffer, size_t Size) { -#ifdef LLVM_ON_WIN32 +#ifdef _WIN32 HCRYPTPROV hProvider; if (CryptAcquireContext(&hProvider, 0, 0, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT | CRYPT_SILENT)) { |
