Summary: Removed dependency on c++ standard library. Some supporting allocators (namely Scudo on Fuchsia, and shortly, scudo standalone) has a hard requirement of no c++stdlib. This patch updates the build system so that we don't have any c++ stdlib dependencies. It also will conveniently fix a racy build-order bug discrepency between GWP-ASan and libc++. Reviewers: phosek, morehouse Reviewed By: phosek, morehouse Subscribers: kubamracek, mgorny, cryptoad, #sanitizers, llvm-commits, beanz, smeenai, vitalybuka Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D62048 llvm-svn: 360982
21 lines
666 B
C++
21 lines
666 B
C++
//===-- random.h ------------------------------------------------*- C++ -*-===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef GWP_ASAN_RANDOM_H_
|
|
#define GWP_ASAN_RANDOM_H_
|
|
|
|
#include <stdint.h>
|
|
|
|
namespace gwp_asan {
|
|
// xorshift (32-bit output), extremely fast PRNG that uses arithmetic operations
|
|
// only. Seeded using walltime.
|
|
uint32_t getRandomUnsigned32();
|
|
} // namespace gwp_asan
|
|
|
|
#endif // GWP_ASAN_RANDOM_H_
|