Browse files

[Driver] Add .hasAnySanitizer() to SanitizerArgs

Add a simple method to query whether any sanitizer was enabled,
via SanitizerArgs.  This will be used in the NetBSD driver to pass
additional definitions that are required by all sanitizers.

Differential Revision:

git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information...
mgorny committed Dec 19, 2018
1 parent 3abed48 commit 5b01cba101848240d513c2f58854c109bc50f2d3
Showing with 1 addition and 0 deletions.
  1. +1 −0 include/clang/Driver/SanitizerArgs.h
@@ -82,6 +82,7 @@ class SanitizerArgs {
bool needsUnwindTables() const;
bool linkCXXRuntimes() const { return LinkCXXRuntimes; }
bool hasCrossDsoCfi() const { return CfiCrossDso; }
bool hasAnySanitizer() const { return !Sanitizers.empty(); }
void addArgs(const ToolChain &TC, const llvm::opt::ArgList &Args,
llvm::opt::ArgStringList &CmdArgs, types::ID InputType) const;

0 comments on commit 5b01cba

Please sign in to comment.