]> granicus.if.org Git - clang/commitdiff
[LSan] Enable -fsanitize=leak for PPC64 Linux.
authorAlex Shlyapnikov <alekseys@google.com>
Thu, 26 Oct 2017 03:09:53 +0000 (03:09 +0000)
committerAlex Shlyapnikov <alekseys@google.com>
Thu, 26 Oct 2017 03:09:53 +0000 (03:09 +0000)
Summary: .

Reviewers: eugenis

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316636 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/ToolChains/Linux.cpp
test/Driver/fsanitize.c

index d99f98038b2da6a9777ad795ef0c353b0d050f2e..613a9f3c88e966bfaf3d9cc5ed77a4110743d84f 100644 (file)
@@ -837,7 +837,7 @@ SanitizerMask Linux::getSupportedSanitizers() const {
   Res |= SanitizerKind::SafeStack;
   if (IsX86_64 || IsMIPS64 || IsAArch64)
     Res |= SanitizerKind::DataFlow;
-  if (IsX86_64 || IsMIPS64 || IsAArch64 || IsX86 || IsArmArch)
+  if (IsX86_64 || IsMIPS64 || IsAArch64 || IsX86 || IsArmArch || IsPowerPC64)
     Res |= SanitizerKind::Leak;
   if (IsX86_64 || IsMIPS64 || IsAArch64 || IsPowerPC64)
     Res |= SanitizerKind::Thread;
index d6f0f198b44cd138c5701adbb9969a715c719fb8..92d5c5da72ccd06c3fb02db11e22d3533ed44f22 100644 (file)
 // RUN: %clang -target mips-unknown-linux -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-MIPS
 // CHECK-SANL-MIPS: unsupported option '-fsanitize=leak' for target 'mips-unknown-linux'
 
+// RUN: %clang -target powerpc64-unknown-linux -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-PPC64
+// RUN: %clang -target powerpc64le-unknown-linux -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-PPC64
+// CHECK-SANL-PPC64: "-fsanitize=leak"
 // RUN: %clang -target powerpc-unknown-linux -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-PPC
 // CHECK-SANL-PPC: unsupported option '-fsanitize=leak' for target 'powerpc-unknown-linux'