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

Steve O'Brien via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 2 08:57:29 PDT 2016


elsteveogrande added a comment.

Added a couple of notes



> PrintPreprocessedOutput.cpp:241
>    }
> -  
>    return false;

Re-reading this diff, I saw hat my editor trimmed EOL whitespace automatically and I let these minor changes become part of the patch.  Sorry for the noise :)

> PrintPreprocessedOutput.cpp:390
> +    if (DumpIncludeDirectives) {
> +      // FIXME: Preserve whether this was a #include/#include_next/#include_macros/#import.
> +      OS << "#include "

The FIXME and hardcoded `#include` are copied from the clause just above this.  Seems getting the text for this token wasn't that easy.  I can try again and solve this in a future patch, if it's ok to let this ine slide, @rsmith.

> dump_import.m:1
> +// RUN: %clang_cc1 -E -dI %s -o - | grep '^#i'
> +#import "dump_import.h"

Also: I should have said `^#include` at the end of this line.  Fortunately if the TODO is fixed, the preprocessor will report `#import` and this test will still work :)

Repository:
  rL LLVM

https://reviews.llvm.org/D25153





More information about the cfe-commits mailing list