[PATCH] D137996: Add support for a backdoor driver option that enables emitting header usage information in JSON to a file

Jan Svoboda via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 17 12:49:20 PST 2022


jansvoboda11 added inline comments.


================
Comment at: clang/include/clang/Driver/Driver.h:239
+  /// enviroment variable CC_PRINT_HEADERS_FORMAT.
+  std::string CCPrintHeadersFormat;
 
----------------
Can we make this `HeaderIncludeFormatEnum` instead of `std::string`?


================
Comment at: clang/include/clang/Frontend/DependencyOutputOptions.h:48
+  /// The format of header information.
+  enum HeaderIncludeFormatEnum {
+    HIF_Textual,
----------------
I'd either drop the `Enum` suffix or replace it with `Kind`. But up to you.


================
Comment at: clang/lib/Frontend/HeaderIncludeGen.cpp:251
+  FileID MainID = SM.getMainFileID();
+  std::string MainFilename;
+
----------------
This can be `StringRef` I think.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137996/new/

https://reviews.llvm.org/D137996



More information about the cfe-commits mailing list