[cfe-dev] Using llvm::RandomNumberGenerator in Clang
Felix Berlakovich via cfe-dev
cfe-dev at lists.llvm.org
Wed Mar 8 06:19:28 PST 2017
Hi!
We are currently working on a science project with Clang and have to
make some modifications to ItaniumCXXABI.cpp. We need to generate
random numbers and in order to make the tests predictable we also need
to be able to provide a static random seed (e.g. from the commandline).
This seems to be the exact functionality provided by the
RandomNumberGenreator class in LLVM.
However, the RandomNumberGenerator can only be generated via a Module
and based on an LLVM Pass, but from our understanding the code we are
working on (ItaniumCXXABI) does not really run inside a LLVM Pass, does
it? Could someone advise us on how to use the RandomNumberGenerator in
Clang?
Thanks in advance
Felix
More information about the cfe-dev
mailing list