summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2016-10-28 16:32:10 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2016-10-28 16:32:10 +0000
commitc9af134dda5a941c1addadf765e9360efe0e7766 (patch)
treed8837b06c6e93059272cf0c8134288e3f6a0dd53 /clang/lib/Frontend/CompilerInvocation.cpp
parent2b42ccc78b38e5b11305f7316e108882986f5aa9 (diff)
downloadbcm5719-llvm-c9af134dda5a941c1addadf765e9360efe0e7766.tar.gz
bcm5719-llvm-c9af134dda5a941c1addadf765e9360efe0e7766.zip
[Preprocessor] Support for '-dI' flag
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/D25153 llvm-svn: 285411
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 8588fa37810..571327b806f 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -2353,6 +2353,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