NetBSD, OpenBSD, and Dragonfly BSD also have arc4random. Patch from

Joerg Sonnenberger!

llvm-svn: 123669
This commit is contained in:
Douglas Gregor 2011-01-17 19:16:24 +00:00
parent a09c6cca72
commit 45e84b0053
1 changed files with 4 additions and 1 deletions

View File

@ -23,7 +23,10 @@ using namespace ento;
static bool isArc4RandomAvailable(const ASTContext &Ctx) {
const llvm::Triple &T = Ctx.Target.getTriple();
return T.getVendor() == llvm::Triple::Apple ||
T.getOS() == llvm::Triple::FreeBSD;
T.getOS() == llvm::Triple::FreeBSD ||
T.getOS() == llvm::Triple::NetBSD ||
T.getOS() == llvm::Triple::OpenBSD ||
T.getOS() == llvm::Triple::DragonFly;
}
namespace {