Added AnalysisConsumer, a meta-level ASTConsumer class to drive various
analyses. This potentially is the primordial origins of a Clang-equivalent
"PassManager".

The new AnalysisConsumer interface allows multiple analyses to be run from a
single invocation of Clang.

Migrated the logic of "-warn-dead-stores" and "-warn-uninit-values" to use the
new AnalysisConsumer interface. The new interface results in a significant code
reduction to incorporate an analysis into the Driver.

Updated a test case to (correctly) acknowledge that it contains a dead store
(this check wasn't being performed because it was previously masked by
-warn-uninit-values).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52996 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/AnalysisConsumer.h b/Driver/AnalysisConsumer.h
new file mode 100644
index 0000000..3a2f3b9
--- /dev/null
+++ b/Driver/AnalysisConsumer.h
@@ -0,0 +1,34 @@
+//===--- AnalysisConsumer.cpp - ASTConsumer for running Analyses ----------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// "Meta" ASTConsumer for running different source analyses.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef DRIVER_ANALYSISCONSUMER_H
+#define DRIVER_ANALYSISCONSUMER_H
+
+namespace clang {
+
+enum Analyses {
+  WarnDeadStores,
+  WarnUninitVals
+};
+  
+ASTConsumer* CreateAnalysisConsumer(Analyses* Beg, Analyses* End,
+                                    Diagnostic &diags, Preprocessor* pp,
+                                    PreprocessorFactory* ppf,
+                                    const LangOptions& lopts,
+                                    const std::string& fname,
+                                    const std::string& htmldir,
+                                    bool visualize, bool trim,
+                                    bool analyzeAll);
+} // end clang namespace
+
+#endif