Allow -fsanitize-coverage=N with ubsan, clang part

Summary:
Allow -fsanitize-coverage=N with ubsan, clang part.
This simply allows the flag combination.
The LLVM will work out of the box, the compile-rt part
will follow as a separate patch.

Test Plan: check-clang

Reviewers: samsonov

Reviewed By: samsonov

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D6849

llvm-svn: 225229
diff --git a/clang/lib/Driver/SanitizerArgs.cpp b/clang/lib/Driver/SanitizerArgs.cpp
index adffad2..09c2cb0 100644
--- a/clang/lib/Driver/SanitizerArgs.cpp
+++ b/clang/lib/Driver/SanitizerArgs.cpp
@@ -43,7 +43,8 @@
   NeedsUbsanRt = Undefined | Integer,
   NotAllowedWithTrap = Vptr,
   RequiresPIE = Memory | DataFlow,
-  NeedsUnwindTables = Address | Thread | Memory | DataFlow
+  NeedsUnwindTables = Address | Thread | Memory | DataFlow,
+  SupportsCoverage = Address | Memory | Leak | Undefined | Integer
 };
 }
 
@@ -295,7 +296,7 @@
   }
 
   // Parse -fsanitize-coverage=N. Currently one of asan/msan/lsan is required.
-  if (NeedsAsan || NeedsMsan || NeedsLsan) {
+  if (hasOneOf(Sanitizers, SupportsCoverage)) {
     if (Arg *A = Args.getLastArg(options::OPT_fsanitize_coverage)) {
       StringRef S = A->getValue();
       // Legal values are 0..4.