aboutsummaryrefslogtreecommitdiff
path: root/Driver/clang.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Driver/clang.cpp')
-rw-r--r--Driver/clang.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/Driver/clang.cpp b/Driver/clang.cpp
index 9d8f71288f..6d9b6b0e46 100644
--- a/Driver/clang.cpp
+++ b/Driver/clang.cpp
@@ -49,6 +49,7 @@ static llvm::cl::opt<bool>
Stats("stats", llvm::cl::desc("Print performance metrics and statistics"));
enum ProgActions {
+ RewriteTest, // Rewriter testing stuff.
EmitLLVM, // Emit a .ll file.
ASTPrint, // Parse ASTs and print them.
ASTDump, // Parse ASTs and dump them.
@@ -101,6 +102,8 @@ ProgAction(llvm::cl::desc("Choose output type:"), llvm::cl::ZeroOrMore,
"Flag warnings of uses of unitialized variables."),
clEnumValN(EmitLLVM, "emit-llvm",
"Build ASTs then convert to LLVM, emit .ll file"),
+ clEnumValN(RewriteTest, "rewrite-test",
+ "Playground for the code rewriter"),
clEnumValEnd));
static llvm::cl::opt<bool>
@@ -796,6 +799,10 @@ static void ProcessInputFile(Preprocessor &PP, unsigned MainFileID,
case EmitLLVM:
Consumer = CreateLLVMEmitter(PP.getDiagnostics());
break;
+
+ case RewriteTest:
+ Consumer = CreateCodeRewriterTest();
+ break;
}
if (Consumer) {