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

Akira Hatanaka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 17 18:30:04 PST 2022


ahatanak added inline comments.


================
Comment at: clang/lib/Frontend/HeaderIncludeGen.cpp:251
+  FileID MainID = SM.getMainFileID();
+  std::string MainFilename;
+
----------------
jansvoboda11 wrote:
> This can be `StringRef` I think.
I simplified this part by removing the code that checks whether `MainID` is valid. It's set when `BeginSourceFile` is called, so it should be valid.


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