Add a mode of hackily syntax highlighting comments. This has a number of
problems, including the fact that it doesn't work well with multi-line
comments due to Ted's crazy table. However, that could be fixed, and it
does work with single-line ones :).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49778 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/clang.cpp b/Driver/clang.cpp
index 09140c9..a9ae98e 100644
--- a/Driver/clang.cpp
+++ b/Driver/clang.cpp
@@ -1033,6 +1033,7 @@
static ASTConsumer* CreateASTConsumer(const std::string& InFile,
Diagnostic& Diag, FileManager& FileMgr,
const LangOptions& LangOpts,
+ Preprocessor *PP,
llvm::Module *&DestModule) {
switch (ProgAction) {
default:
@@ -1048,7 +1049,7 @@
return CreateASTViewer();
case EmitHTML:
- return CreateHTMLPrinter(OutputFile, Diag);
+ return CreateHTMLPrinter(OutputFile, Diag, PP);
case ParseCFGDump:
case ParseCFGView:
@@ -1099,10 +1100,8 @@
switch (ProgAction) {
default:
- Consumer = CreateASTConsumer(InFile,
- PP.getDiagnostics(),
- PP.getFileManager(),
- PP.getLangOptions(),
+ Consumer = CreateASTConsumer(InFile, PP.getDiagnostics(),
+ PP.getFileManager(), PP.getLangOptions(), &PP,
CodeGenModule);
if (!Consumer) {
@@ -1242,7 +1241,7 @@
// translation unit, rather than InFile.
llvm::Module *DestModule;
llvm::OwningPtr<ASTConsumer>
- Consumer(CreateASTConsumer(InFile, Diag, FileMgr, TU->getLangOpts(),
+ Consumer(CreateASTConsumer(InFile, Diag, FileMgr, TU->getLangOpts(), 0,
DestModule));
if (!Consumer) {