Move SanitizerArgs to the clang Driver

Summary:
This change turns SanitizerArgs into high-level options
stored in the Driver, which are parsed lazily. This fixes an issue of multiple copies of the same diagnostic message produced by sanitizer arguments parser.

Reviewers: rsmith

Reviewed By: rsmith

CC: chandlerc, eugenis, cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1341

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188660 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/ToolChain.cpp b/lib/Driver/ToolChain.cpp
index 4fe3560..ca74395 100644
--- a/lib/Driver/ToolChain.cpp
+++ b/lib/Driver/ToolChain.cpp
@@ -42,6 +42,10 @@
                       IsIntegratedAssemblerDefault());
 }
 
+const SanitizerArgs& ToolChain::getSanitizerArgs() const {
+  return D.getOrParseSanitizerArgs(Args);
+}
+
 std::string ToolChain::getDefaultUniversalArchName() const {
   // In universal driver terms, the arch name accepted by -arch isn't exactly
   // the same as the ones that appear in the triple. Roughly speaking, this is