Enable LLVM asan support for NetBSD/i386

Summary:
Verified to work and useful to run check-asan, as this target tests 32-bit and 64-bit execution.

Sponsored by <The NetBSD Foundation>

Reviewers: joerg, filcab, dim, vitalybuka

Reviewed By: vitalybuka

Subscribers: #sanitizers, cfe-commits

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D36378

llvm-svn: 310245
This commit is contained in:
Kamil Rytarowski 2017-08-07 10:57:03 +00:00
parent bdd455f0d5
commit 9d1f5dc37b
1 changed files with 2 additions and 1 deletions

View File

@ -417,9 +417,10 @@ void NetBSD::addLibStdCxxIncludePaths(const llvm::opt::ArgList &DriverArgs,
}
SanitizerMask NetBSD::getSupportedSanitizers() const {
const bool IsX86 = getTriple().getArch() == llvm::Triple::x86;
const bool IsX86_64 = getTriple().getArch() == llvm::Triple::x86_64;
SanitizerMask Res = ToolChain::getSupportedSanitizers();
if (IsX86_64) {
if (IsX86 || IsX86_64) {
Res |= SanitizerKind::Address;
}
return Res;