ccc: Add --analyze driver mode (for running static analyzer).

 - For now forces generation of plist files, need to think about the
   right interface.

 - Changed -fsyntax-only mode to be its own phase (more consistent).

 - Add -WA, for passing options verbatim to analyzer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62649 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/ccc/ccclib/Arguments.py b/tools/ccc/ccclib/Arguments.py
index 04dfbbf..d9fd11d 100644
--- a/tools/ccc/ccclib/Arguments.py
+++ b/tools/ccc/ccclib/Arguments.py
@@ -527,6 +527,8 @@
 
         # Blanket pass-through options.
 
+        self.WAOption = self.addOption(CommaJoinedOption('-WA,'))        
+
         self.WaOption = self.addOption(CommaJoinedOption('-Wa,'))
         self.XassemblerOption = self.addOption(SeparateOption('-Xassembler'))
 
@@ -831,6 +833,9 @@
         self.addOption(JoinedOrSeparateOption('-V'))
         self.addOption(JoinedOrSeparateOption('-b'))
 
+        # Clang static analyzer options (also see -WA,).
+        self.analyzeOption = self.addOption(FlagOption('--analyze'))
+
     def addOption(self, opt):
         self.options.append(opt)
         return opt