r220680 - Allow thread sanitizer in clang driver on FreeBSD
Viktor Kutuzov
vkutuzov at accesssoftek.com
Mon Oct 27 06:51:25 PDT 2014
Author: vkutuzov
Date: Mon Oct 27 08:51:25 2014
New Revision: 220680
URL: http://llvm.org/viewvc/llvm-project?rev=220680&view=rev
Log:
Allow thread sanitizer in clang driver on FreeBSD
http://reviews.llvm.org/D5999
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=220680&r1=220679&r2=220680&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/SanitizerArgs.cpp (original)
+++ cfe/trunk/lib/Driver/SanitizerArgs.cpp Mon Oct 27 08:51:25 2014
@@ -267,17 +267,22 @@ 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;
+ unsigned KindsToFilterOut = 0;
if (!(IsLinux && IsX86_64)) {
- filterUnsupportedMask(TC, Kinds, Thread | Memory | DataFlow, Args, A,
- DiagnoseErrors, DiagnosedKinds);
+ KindsToFilterOut |= Memory | DataFlow;
+ }
+ if (!((IsLinux || IsFreeBSD) && IsX86_64)) {
+ KindsToFilterOut |= Thread;
}
if (!(IsLinux && (IsX86 || IsX86_64))) {
- filterUnsupportedMask(TC, Kinds, Function, Args, A, DiagnoseErrors,
- DiagnosedKinds);
+ KindsToFilterOut |= Function;
}
+ filterUnsupportedMask(TC, Kinds, KindsToFilterOut, Args, A, DiagnoseErrors,
+ DiagnosedKinds);
return Kinds;
}
More information about the cfe-commits
mailing list