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

Steve O'Brien via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 6 21:52:31 PDT 2016


elsteveogrande added inline comments.


> PrintPreprocessedOutput.cpp:388-394
> +      if (SearchPath.size() > 0) {
> +        // Print out info about the search path within this comment.  We need
> +        // to escape it because we're printing a quoted string within the
> +        // comment block.
> +        OS << " path=\"" << sanitizePath(SearchPath) << "\"";
> +      } else {
> +        OS << " absolute";

facepalm -- how did I miss that `size() > 0`.  I'll fix that along with the next batch of updates.

Or another idea.  To get this out the door, perhaps I just drop this and `sanitizePath`?  The essential part (for me) is getting the `-dI` option working, and printing at least the `#include`s.  More useful diagnostic info can get tacked on later perhaps.

https://reviews.llvm.org/D25153





More information about the cfe-commits mailing list