r220675 - Allow thread sanitizer in clang driver on FreeBSD
Viktor Kutuzov
vkutuzov at accesssoftek.com
Mon Oct 27 04:26:01 PDT 2014
Author: vkutuzov
Date: Mon Oct 27 06:26:01 2014
New Revision: 220675
URL: http://llvm.org/viewvc/llvm-project?rev=220675&view=rev
Log:
Allow thread sanitizer in clang driver on FreeBSD
Differential Revision: http://reviews.llvm.org/D5994
Modified:
cfe/trunk/lib/Driver/SanitizerArgs.cpp
Modified: cfe/trunk/lib/Driver/SanitizerArgs.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/SanitizerArgs.cpp?rev=220675&r1=220674&r2=220675&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/SanitizerArgs.cpp (original)
+++ cfe/trunk/lib/Driver/SanitizerArgs.cpp Mon Oct 27 06:26:01 2014
@@ -267,11 +267,16 @@ unsigned SanitizerArgs::filterUnsupporte
const llvm::opt::Arg *A,
bool DiagnoseErrors,
unsigned &DiagnosedKinds) {
+ bool IsFreeBSD = TC.getTriple().getOS() == llvm::Triple::FreeBSD;
bool IsLinux = TC.getTriple().getOS() == llvm::Triple::Linux;
bool IsX86 = TC.getTriple().getArch() == llvm::Triple::x86;
bool IsX86_64 = TC.getTriple().getArch() == llvm::Triple::x86_64;
if (!(IsLinux && IsX86_64)) {
- filterUnsupportedMask(TC, Kinds, Thread | Memory | DataFlow, Args, A,
+ filterUnsupportedMask(TC, Kinds, Memory | DataFlow, Args, A,
+ DiagnoseErrors, DiagnosedKinds);
+ }
+ if (!((IsLinux || IsFreeBSD) && IsX86_64)) {
+ filterUnsupportedMask(TC, Kinds, Thread, Args, A,
DiagnoseErrors, DiagnosedKinds);
}
if (!(IsLinux && (IsX86 || IsX86_64))) {
More information about the cfe-commits
mailing list