]> granicus.if.org Git - clang/commit
[Preprocessor] Support for '-dI' flag
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Thu, 17 Nov 2016 22:45:31 +0000 (22:45 +0000)
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Thu, 17 Nov 2016 22:45:31 +0000 (22:45 +0000)
commit9483fa6dbe01ac2b7513a2bf50dcb599ebe4af46
tree3dc90aeec2c430122d5bdf8bd06466f28b558b47
parent9ae75a1c345c50d929c5b45ff17b1d3facf8f356
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@287275 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]