(Note: fixes https://reviews.llvm.org/D25153 which almost worked, but had 1 failure under windows because of my broken test).
Already exists in gcc (look for -dCHARS in https://gcc.gnu.org/onlinedocs/gcc-6.2.0/gcc/Preprocessor-Options.html#Preprocessor-Options ).
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). In my own testing and experimenting with it I do see similar results to gcc's.
(Test results and more discussion on original diff: D25153 )
(Fix for the broken windows test is here)