diff options
author | David Blaikie <dblaikie@gmail.com> | 2012-06-06 18:52:13 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2012-06-06 18:52:13 +0000 |
commit | 8c0b3787e7ccc7978b42dfbb84da2b802c743a5d (patch) | |
tree | e336113d6242ee1e318912bea56957a9b3a6d617 /lib/Frontend | |
parent | 80d7c52653800d3338cca2c4388348010d2b1921 (diff) |
Add a -rewrite-includes option, which is similar to -rewrite-macros, but only expands #include directives.
Patch contributed by Lubos Lunak (l.lunax@suse.cz).
Review by Matt Beaumont-Gay (matthewbg@google.com).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158093 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend')
-rw-r--r-- | lib/Frontend/CompilerInvocation.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index 5a3732bf43..35ffe4941c 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -445,6 +445,7 @@ static const char *getActionName(frontend::ActionKind Kind) { case frontend::PrintPreamble: return "-print-preamble"; case frontend::PrintPreprocessedInput: return "-E"; case frontend::RewriteMacros: return "-rewrite-macros"; + case frontend::RewriteIncludes: return "-rewrite-includes"; case frontend::RewriteObjC: return "-rewrite-objc"; case frontend::RewriteTest: return "-rewrite-test"; case frontend::RunAnalysis: return "-analyze"; @@ -1435,6 +1436,8 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args, Opts.ProgramAction = frontend::PrintPreprocessedInput; break; case OPT_rewrite_macros: Opts.ProgramAction = frontend::RewriteMacros; break; + case OPT_rewrite_includes: + Opts.ProgramAction = frontend::RewriteIncludes; break; case OPT_rewrite_objc: Opts.ProgramAction = frontend::RewriteObjC; break; case OPT_rewrite_test: |