diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-08-25 22:30:56 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-08-25 22:30:56 +0000 |
commit | 69f74f80dbc8ee92346d60430e1a376d036adbf0 (patch) | |
tree | 1c90181ae92d822a6b17f2d49f55a5eb7c6b6374 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 371376010f3be4bf97b3ebe4ba4f0359bfb32cde (diff) | |
download | bcm5719-llvm-69f74f80dbc8ee92346d60430e1a376d036adbf0.tar.gz bcm5719-llvm-69f74f80dbc8ee92346d60430e1a376d036adbf0.zip |
Introduce a -cc1 option "-emit-module", that creates a binary module
from the given source. -emit-module behaves similarly to -emit-pch,
except that Sema is somewhat more strict about the contents of
-emit-module. In the future, there are likely to be more interesting
differences.
llvm-svn: 138595
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index bc6b08d686a..763c8a1e8bd 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -372,6 +372,7 @@ static const char *getActionName(frontend::ActionKind Kind) { case frontend::EmitCodeGenOnly: return "-emit-codegen-only"; case frontend::EmitObj: return "-emit-obj"; case frontend::FixIt: return "-fixit"; + case frontend::GenerateModule: return "-emit-module"; case frontend::GeneratePCH: return "-emit-pch"; case frontend::GeneratePTH: return "-emit-pth"; case frontend::InitOnly: return "-init-only"; @@ -1205,6 +1206,8 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args, // fall-through! case OPT_fixit: Opts.ProgramAction = frontend::FixIt; break; + case OPT_emit_module: + Opts.ProgramAction = frontend::GenerateModule; break; case OPT_emit_pch: Opts.ProgramAction = frontend::GeneratePCH; break; case OPT_emit_pth: |