llvm-6502/lib/Support
JF Bastien b4840d7a4d Random Number Generator (llvm)
Provides an abstraction for a random number generator (RNG) that produces a stream of pseudo-random numbers.
The current implementation uses C++11 facilities and is therefore not cryptographically secure.

The RNG is salted with the text of the current command line invocation.
In addition, a user may specify a seed (reproducible builds).

In clang, the seed can be set via

-frandom-seed=X
In the back end, the seed can be set via

-rng-seed=X
This is the llvm part of the patch.
clang part: D3391

URL: http://reviews.llvm.org/D3390
Author: yln

I'm landing this for the second time, it broke Windows bots the first time around.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211705 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-25 15:21:42 +00:00
..
Unix Revert: r211588 - [mips] Use __clear_cache builtin instead of cacheflush() in Unix Memory::InvalidateInstructionCache() 2014-06-24 13:53:56 +00:00
Windows Finishing touch for the std::error_code transition. 2014-06-13 17:20:48 +00:00
Allocator.cpp [Allocator] Hoist the external helper function into a namespace scope 2014-04-14 06:42:56 +00:00
APFloat.cpp APFloat: x - NaN needs to flip the signbit of NaN when x is a number. 2014-06-08 16:53:31 +00:00
APInt.cpp [Modules] Fix potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 03:07:47 +00:00
APSInt.cpp
ARMBuildAttrs.cpp
ARMWinEH.cpp Support: add Windows ARM EH data structures 2014-06-02 01:17:49 +00:00
Atomic.cpp Fix .cpp files claiming to be header files 2014-06-20 01:36:00 +00:00
BlockFrequency.cpp blockfreq: Defer to BranchProbability::scale() (again) 2014-04-29 16:31:29 +00:00
BranchProbability.cpp BranchProb: Simplify printing code 2014-04-29 17:07:42 +00:00
circular_raw_ostream.cpp
CMakeLists.txt Random Number Generator (llvm) 2014-06-25 15:21:42 +00:00
CommandLine.cpp CommandLine: bail out when options get multiply registered 2014-06-19 07:25:25 +00:00
Compression.cpp
ConvertUTF.c Support/ConvertUTF: restore compatibility with MSVC, which only implements C89 2014-06-16 11:22:33 +00:00
ConvertUTFWrapper.cpp
COPYRIGHT.regex
CrashRecoveryContext.cpp Test commit, wraps some lines to fit in 80 columns. 2014-06-10 18:03:04 +00:00
DAGDeltaAlgorithm.cpp [Modules] Make Support/Debug.h modular. This requires it to not change 2014-04-21 22:55:11 +00:00
DataExtractor.cpp Using llvm::sys::swapByteOrder() for the common case of byte-swapping a value in place 2014-06-14 13:18:07 +00:00
DataStream.cpp Remove 'using std::errro_code' from lib. 2014-06-13 02:24:39 +00:00
Debug.cpp [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-15 06:32:26 +00:00
DeltaAlgorithm.cpp
Disassembler.cpp
Dwarf.cpp
DynamicLibrary.cpp Fix .cpp files claiming to be header files 2014-06-20 01:36:00 +00:00
Errno.cpp
ErrorHandling.cpp Merge lib/Support/WindowsError.cpp into ib/Support/ErrorHandling.cpp. 2014-06-17 18:06:45 +00:00
FileOutputBuffer.cpp Finishing touch for the std::error_code transition. 2014-06-13 17:20:48 +00:00
FileUtilities.cpp Remove 'using std::errro_code' from lib. 2014-06-13 02:24:39 +00:00
FoldingSet.cpp [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-15 06:32:26 +00:00
FormattedStream.cpp
GraphWriter.cpp Don't use 'using std::error_code' in include/llvm. 2014-06-12 21:46:39 +00:00
Hashing.cpp
Host.cpp Fix .cpp files claiming to be header files 2014-06-20 01:36:00 +00:00
IncludeFile.cpp
IntEqClasses.cpp
IntervalMap.cpp
IntrusiveRefCntPtr.cpp
IsInf.cpp
IsNAN.cpp
LEB128.cpp
LineIterator.cpp
LLVMBuild.txt
Locale.cpp
LockFileManager.cpp Finishing touch for the std::error_code transition. 2014-06-13 17:20:48 +00:00
Makefile Support: Inject LLVM_VERSION_INFO into the Support library 2014-06-17 06:52:47 +00:00
ManagedStatic.cpp Fix the MinGW builder. Apparently std::call_once and 2014-06-21 00:24:51 +00:00
MD5.cpp
Memory.cpp
MemoryBuffer.cpp Finishing touch for the std::error_code transition. 2014-06-13 17:20:48 +00:00
MemoryObject.cpp
Mutex.cpp [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-15 06:32:26 +00:00
Path.cpp Don't leak a file descriptor. 2014-06-25 14:35:59 +00:00
PluginLoader.cpp
PrettyStackTrace.cpp [C++11] Replace some comparisons with 'nullptr' with simple boolean checks to reduce verbosity. 2014-04-09 04:20:00 +00:00
Process.cpp Fix .cpp files claiming to be header files 2014-06-20 01:36:00 +00:00
Program.cpp Fix .cpp files claiming to be header files 2014-06-20 01:36:00 +00:00
RandomNumberGenerator.cpp Random Number Generator (llvm) 2014-06-25 15:21:42 +00:00
raw_os_ostream.cpp
raw_ostream.cpp Don't use 'using std::error_code' in include/llvm. 2014-06-12 21:46:39 +00:00
README.txt.system
regcclass.h adding re-include guards into lib/Support/reg*.h 2014-06-12 16:07:56 +00:00
regcname.h adding re-include guards into lib/Support/reg*.h 2014-06-12 16:07:56 +00:00
regcomp.c
regengine.inc Clean up language and grammar. 2014-05-20 17:11:11 +00:00
regerror.c
regex2.h adding re-include guards into lib/Support/reg*.h 2014-06-12 16:07:56 +00:00
regex_impl.h
Regex.cpp
regexec.c
regfree.c
regstrlcpy.c
regutils.h adding re-include guards into lib/Support/reg*.h 2014-06-12 16:07:56 +00:00
RWMutex.cpp [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-15 06:32:26 +00:00
ScaledNumber.cpp Support: Move class ScaledNumber 2014-06-24 00:38:09 +00:00
SearchForAddressOfSpecialSymbol.cpp
Signals.cpp
SmallPtrSet.cpp
SmallVector.cpp
SourceMgr.cpp Use SourceMgr::getMemoryBuffer() in a couple of places 2014-06-25 00:41:15 +00:00
Statistic.cpp
StreamableMemoryObject.cpp
StringExtras.cpp
StringMap.cpp Recommit 211309 (StringMap::insert), reverted in 211328 due to issues with private, but non-deleted, move members. 2014-06-23 18:28:53 +00:00
StringPool.cpp Convert StringMapEntry::Create to use StringRef instead of start/end pointers. Simpliies all in tree call sites. No functional change. 2014-06-11 05:35:56 +00:00
StringRef.cpp
StringRefMemoryObject.cpp
SystemUtils.cpp
TargetRegistry.cpp [C++11] Replace some comparisons with 'nullptr' with simple boolean checks to reduce verbosity. 2014-04-09 04:20:00 +00:00
Threading.cpp Revert r211287, "Remove support for LLVM runtime multi-threading." 2014-06-24 13:36:31 +00:00
ThreadLocal.cpp
Timer.cpp Kill the LLVM global lock. 2014-06-19 16:17:42 +00:00
TimeValue.cpp
ToolOutputFile.cpp
Triple.cpp [ARM64] Add big endian target arm64_be. 2014-04-14 17:37:53 +00:00
Twine.cpp
Unicode.cpp
Valgrind.cpp
Watchdog.cpp
YAMLParser.cpp [C++11] Replace some comparisons with 'nullptr' with simple boolean checks to reduce verbosity. 2014-04-09 04:20:00 +00:00
YAMLTraits.cpp Finishing touch for the std::error_code transition. 2014-06-13 17:20:48 +00:00

Design Of lib/System
====================

The software in this directory is designed to completely shield LLVM from any
and all operating system specific functionality. It is not intended to be a
complete operating system wrapper (such as ACE), but only to provide the
functionality necessary to support LLVM.

The software located here, of necessity, has very specific and stringent design
rules. Violation of these rules means that cracks in the shield could form and
the primary goal of the library is defeated. By consistently using this library,
LLVM becomes more easily ported to new platforms since the only thing requiring
porting is this library.

Complete documentation for the library can be found in the file:
  llvm/docs/SystemLibrary.html
or at this URL:
  http://llvm.org/docs/SystemLibrary.html

While we recommend that you read the more detailed documentation, for the
impatient, here's a high level summary of the library's requirements.

 1. No system header files are to be exposed through the interface.
 2. Std C++ and Std C header files are okay to be exposed through the interface.
 3. No exposed system-specific functions.
 4. No exposed system-specific data.
 5. Data in lib/System classes must use only simple C++ intrinsic types.
 6. Errors are handled by returning "true" and setting an optional std::string
 7. Library must not throw any exceptions, period.
 8. Interface functions must not have throw() specifications.
 9. No duplicate function impementations are permitted within an operating
    system class.

To accomplish these requirements, the library has numerous design criteria that
must be satisfied. Here's a high level summary of the library's design criteria:

 1. No unused functionality (only what LLVM needs)
 2. High-Level Interfaces
 3. Use Opaque Classes
 4. Common Implementations
 5. Multiple Implementations
 6. Minimize Memory Allocation
 7. No Virtual Methods