r310245 - Enable LLVM asan support for NetBSD/i386

Kamil Rytarowski via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 7 03:57:03 PDT 2017


Author: kamil
Date: Mon Aug  7 03:57:03 2017
New Revision: 310245

URL: http://llvm.org/viewvc/llvm-project?rev=310245&view=rev
Log:
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

Modified:
    cfe/trunk/lib/Driver/ToolChains/NetBSD.cpp

Modified: cfe/trunk/lib/Driver/ToolChains/NetBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/NetBSD.cpp?rev=310245&r1=310244&r2=310245&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/NetBSD.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/NetBSD.cpp Mon Aug  7 03:57:03 2017
@@ -417,9 +417,10 @@ void NetBSD::addLibStdCxxIncludePaths(co
 }
 
 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;




More information about the cfe-commits mailing list