diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-03-18 21:19:49 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-03-18 21:19:49 +0000 |
commit | 6a34083e9f74a45e2f79c9fab66f177809a5db66 (patch) | |
tree | f97793bee9cb46a4fc27d293873070ce7c937879 /Driver/clang.cpp | |
parent | 886c8db545170850f7806f47b5f6120864effd09 (diff) |
Added the beginning of a set of rewriter functions for pretty-printing source
code as HTML. Added a new driver option "--emit-html" to dump the source
of the main input file as HTML.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48505 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/clang.cpp')
-rw-r--r-- | Driver/clang.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Driver/clang.cpp b/Driver/clang.cpp index c004d9d6b1..333ac6096a 100644 --- a/Driver/clang.cpp +++ b/Driver/clang.cpp @@ -63,6 +63,7 @@ enum ProgActions { EmitLLVM, // Emit a .ll file. EmitBC, // Emit a .bc file. SerializeAST, // Emit a .ast file. + EmitHTML, // Translate input source into HTML. ASTPrint, // Parse ASTs and print them. ASTDump, // Parse ASTs and dump them. ASTView, // Parse ASTs and view them in Graphviz. @@ -100,6 +101,8 @@ ProgAction(llvm::cl::desc("Choose output type:"), llvm::cl::ZeroOrMore, "Run parser and perform semantic analysis"), clEnumValN(ParsePrintCallbacks, "parse-print-callbacks", "Run parser and print each callback invoked"), + clEnumValN(EmitHTML, "emit-html", + "Output input source as HTML"), clEnumValN(ASTPrint, "ast-print", "Build ASTs and then pretty-print them"), clEnumValN(ASTDump, "ast-dump", @@ -994,7 +997,10 @@ static ASTConsumer* CreateASTConsumer(const std::string& InFile, return CreateASTDumper(); case ASTView: - return CreateASTViewer(); + return CreateASTViewer(); + + case EmitHTML: + return CreateHTMLPrinter(); case ParseCFGDump: case ParseCFGView: |