Skip to content

Commit

Permalink
[Driver] Add .hasAnySanitizer() to SanitizerArgs
Browse files Browse the repository at this point in the history
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: https://reviews.llvm.org/D55832

llvm-svn: 349649
  • Loading branch information
mgorny committed Dec 19, 2018
1 parent 429d223 commit 1d43b32
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions clang/include/clang/Driver/SanitizerArgs.h
Expand Up @@ -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;
};
Expand Down

0 comments on commit 1d43b32

Please sign in to comment.