]> granicus.if.org Git - clang/commit
[Preprocessor] Support for '-dI' flag
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Fri, 28 Oct 2016 16:32:10 +0000 (16:32 +0000)
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Fri, 28 Oct 2016 16:32:10 +0000 (16:32 +0000)
commitbbd8f1a4114f900318055cc0ced862a6af91bc49
tree478114fe0d86a9fc26fd1e05bfd31ed6e8d3818f
parent242cc12621eb42daa43c507ff2b929ab79166bd7
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@285411 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Driver/Options.td
include/clang/Frontend/PreprocessorOutputOptions.h
lib/Frontend/CompilerInvocation.cpp
lib/Frontend/PrintPreprocessedOutput.cpp
test/Preprocessor/dump_import.h [new file with mode: 0644]
test/Preprocessor/dump_import.m [new file with mode: 0644]
test/Preprocessor/dump_include.c [new file with mode: 0644]
test/Preprocessor/dump_include.h [new file with mode: 0644]