From c9af134dda5a941c1addadf765e9360efe0e7766 Mon Sep 17 00:00:00 2001 From: Bruno Cardoso Lopes Date: Fri, 28 Oct 2016 16:32:10 +0000 Subject: [Preprocessor] Support for '-dI' flag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- clang/lib/Frontend/CompilerInvocation.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'clang/lib/Frontend/CompilerInvocation.cpp') diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 8588fa3..571327b 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); } -- cgit v1.1