summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2016-11-17 22:45:31 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2016-11-17 22:45:31 +0000
commit6fa3b742e0c77d54c7f3914f929dcac1c37a81d8 (patch)
tree9a60151049d962aa2f8ce3af8f8e15ff861aeb96 /clang/lib/Frontend/CompilerInvocation.cpp
parent592fa122c2a2873d04cf115d9939c0d7a4f35057 (diff)
downloadbcm5719-llvm-6fa3b742e0c77d54c7f3914f929dcac1c37a81d8.tar.gz
bcm5719-llvm-6fa3b742e0c77d54c7f3914f929dcac1c37a81d8.zip
[Preprocessor] Support for '-dI' flag
Re-introduce r285411. Implement the -dI as supported by GCC: Output ‘#include’ directives in addition to the result of preprocessing. This change aims to add this option, pass it through to the preprocessor via the options class, and when inclusions occur we output some information (+ test cases). Patch by Steve O'Brien! Differential Revision: https://reviews.llvm.org/D26089 llvm-svn: 287275
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 2bdd40cc995..874827b7e5f 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -2357,6 +2357,7 @@ static void ParsePreprocessorOutputArgs(PreprocessorOutputOptions &Opts,
Opts.ShowLineMarkers = !Args.hasArg(OPT_P);
Opts.ShowMacroComments = Args.hasArg(OPT_CC);
Opts.ShowMacros = Args.hasArg(OPT_dM) || Args.hasArg(OPT_dD);
+ Opts.ShowIncludeDirectives = Args.hasArg(OPT_dI);
Opts.RewriteIncludes = Args.hasArg(OPT_frewrite_includes);
Opts.UseLineDirectives = Args.hasArg(OPT_fuse_line_directives);
}
OpenPOWER on IntegriCloud