delcypher added inline comments.

================
Comment at: clang/lib/Driver/ToolChains/Darwin.cpp:2298
   SanitizerMask Res = ToolChain::getSupportedSanitizers();
-  Res |= SanitizerKind::Address;
-  Res |= SanitizerKind::Leak;
-  Res |= SanitizerKind::Fuzzer;
-  Res |= SanitizerKind::FuzzerNoLink;
+
+  if (sanitizerRuntimeExists("asan"))
----------------
I feel that we should assert that `Res` doesn't already contain the 
SanitizerKind we are decided whether or not to set.
E.g.

```
assert(!(Res & SanitizerKind::Address));
if (sanitizerRuntimeExists("asan")) {
  Res |= SanitizerKind::Address;
}
```


https://reviews.llvm.org/D15225



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to