aboutsummaryrefslogtreecommitdiff
path: root/Driver/clang.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Driver/clang.cpp')
-rw-r--r--Driver/clang.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/Driver/clang.cpp b/Driver/clang.cpp
index 91d521246a..ae7ec879dd 100644
--- a/Driver/clang.cpp
+++ b/Driver/clang.cpp
@@ -66,6 +66,7 @@ enum ProgActions {
RewriteObjC, // ObjC->C Rewriter.
RewriteBlocks, // ObjC->C Rewriter for Blocks.
RewriteMacros, // Expand macros but not #includes.
+ RewriteTest, // Rewriter playground
HTMLTest, // HTML displayer testing stuff.
EmitLLVM, // Emit a .ll file.
EmitBC, // Emit a .bc file.
@@ -119,6 +120,8 @@ ProgAction(llvm::cl::desc("Choose output type:"), llvm::cl::ZeroOrMore,
"Build ASTs then convert to LLVM, emit .bc file"),
clEnumValN(SerializeAST, "serialize",
"Build ASTs and emit .ast file"),
+ clEnumValN(RewriteTest, "rewrite-test",
+ "Rewriter playground"),
clEnumValN(RewriteObjC, "rewrite-objc",
"Rewrite ObjC into C (code rewriter example)"),
clEnumValN(RewriteMacros, "rewrite-macros",
@@ -1173,6 +1176,11 @@ static void ProcessInputFile(Preprocessor &PP, PreprocessorFactory &PPF,
RewriteMacrosInInput(PP, InFile, OutputFile);
ClearSourceMgr = true;
break;
+
+ case RewriteTest:
+ DoRewriteTest(PP, InFile, OutputFile);
+ ClearSourceMgr = true;
+ break;
}
if (Consumer) {