class Preprocessor: Now owns the "predefines" char*; it deletes [] it in its dstor.

clang.cpp: InitializePreprocessor now makes a copy of the contents of PredefinesBuffer and
  passes it to the preprocessor object.
  
clang.cpp: DriverPreprocessorFactory now calls "InitializePreprocessor" instead of this being done in main().

html::HighlightMacros() now takes a PreprocessorFactory, allowing it to conjure up a new
Preprocessor to highlight macros.

class HTMLDiagnostics now takes a PreprocessorFactory* that it can use for html::HighlightMacros().
Updated clients of HTMLDiagnostics to use this new interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49875 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/ASTConsumers.h b/Driver/ASTConsumers.h
index 391ff02..7ef42a0 100644
--- a/Driver/ASTConsumers.h
+++ b/Driver/ASTConsumers.h
@@ -28,6 +28,8 @@
 class FileManager;
 struct LangOptions;
 class Preprocessor;
+class PreprocessorFactory;
+
 
 ASTConsumer *CreateASTPrinter(std::ostream* OS = NULL);
 
@@ -44,13 +46,13 @@
 ASTConsumer *CreateUnitValsChecker(Diagnostic &Diags);
   
 ASTConsumer *CreateGRSimpleVals(Diagnostic &Diags,
-                                Preprocessor* PP,
+                                Preprocessor* PP, PreprocessorFactory* PPF,
                                 const std::string& Function,
                                 const std::string& HTMLDir, bool Visualize,
                                 bool TrimGraph, bool AnalyzeAll);
   
 ASTConsumer *CreateCFRefChecker(Diagnostic &Diags,
-                                Preprocessor* PP,
+                                Preprocessor* PP, PreprocessorFactory* PPF,
                                 const std::string& Function,
                                 const std::string& HTMLDir, bool Visualize,
                                 bool TrimGraph, bool AnalyzeAll);
@@ -61,7 +63,7 @@
                                     const LangOptions &LOpts);
 
 ASTConsumer* CreateHTMLPrinter(const std::string &OutFile, Diagnostic &D,
-                               Preprocessor *PP);
+                               Preprocessor *PP, PreprocessorFactory* PPF);
 
 ASTConsumer *CreateSerializationTest(Diagnostic &Diags,
                                      FileManager& FMgr,