summaryrefslogtreecommitdiffstats
path: root/clang/Driver/clang.cpp
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2008-09-18 14:10:13 +0000
committerSteve Naroff <snaroff@apple.com>2008-09-18 14:10:13 +0000
commit9779e92fa4e659381b86f75726da0848fcc66bd3 (patch)
treec91374c89c9d2304c2b25f4612a4e23aa8a00165 /clang/Driver/clang.cpp
parent5cc53c34c366fa8b6e389c7c1751c50c0f64041a (diff)
downloadbcm5719-llvm-9779e92fa4e659381b86f75726da0848fcc66bd3.tar.gz
bcm5719-llvm-9779e92fa4e659381b86f75726da0848fcc66bd3.zip
Add driver support for invoking block rewriter.
Also tweaked the create function to take an explicit output file. llvm-svn: 56305
Diffstat (limited to 'clang/Driver/clang.cpp')
-rw-r--r--clang/Driver/clang.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/Driver/clang.cpp b/clang/Driver/clang.cpp
index 0efe56a3507..ff98bff9dc8 100644
--- a/clang/Driver/clang.cpp
+++ b/clang/Driver/clang.cpp
@@ -61,6 +61,7 @@ Stats("print-stats",
enum ProgActions {
RewriteObjC, // ObjC->C Rewriter.
+ RewriteBlocks, // ObjC->C Rewriter for Blocks.
RewriteMacros, // Expand macros but not #includes.
HTMLTest, // HTML displayer testing stuff.
EmitLLVM, // Emit a .ll file.
@@ -116,6 +117,8 @@ ProgAction(llvm::cl::desc("Choose output type:"), llvm::cl::ZeroOrMore,
"Rewrite ObjC into C (code rewriter example)"),
clEnumValN(RewriteMacros, "rewrite-macros",
"Expand macros without full preprocessing"),
+ clEnumValN(RewriteBlocks, "rewrite-blocks",
+ "Rewrite Blocks to C"),
clEnumValEnd));
@@ -989,6 +992,9 @@ static ASTConsumer* CreateASTConsumer(const std::string& InFile,
case RewriteObjC:
return CreateCodeRewriterTest(InFile, OutputFile, Diag, LangOpts);
+
+ case RewriteBlocks:
+ return CreateBlockRewriter(InFile, OutputFile, Diag, LangOpts);
case RunAnalysis:
assert (!AnalysisList.empty());
OpenPOWER on IntegriCloud