[PATCH] D25153: preprocessor supports `-dI` flag

Steve O'Brien via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 4 11:00:51 PDT 2016


elsteveogrande added a comment.

Thanks again @majnemer!  Other vars are fixed, will send an update shortly.



> majnemer wrote in PrintPreprocessedOutput.cpp:344
> Could this just return a StringRef? You could use an empty StringRef on failure.

I'll get rid of this in favor of `PP.getSpelling(token)` instead.

Also (and I added this in the unit tests) it happens to work for `include`, `include_next`, `include_macros`, `import`.

https://reviews.llvm.org/D25153





More information about the cfe-commits mailing list