[clang] [clang][modules] Adopt `FileEntryRef` in the `HeaderFileInfo` block in PCM files (PR #67383)

via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 25 16:57:37 PDT 2023


github-actions[bot] wrote:


<!--LLVM CODE FORMAT COMMENT: {clang-format}-->

:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff feb7b1914d513c709b9e024dfed709bb889cc853 e2201a10fe76be3de8efd0faca0f381f504b08d3 -- clang/include/clang/Basic/FileManager.h clang/lib/Basic/FileManager.cpp clang/lib/Serialization/ASTWriter.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp
index 1d939a3f5e7a..ef9d5462f1c7 100644
--- a/clang/lib/Serialization/ASTWriter.cpp
+++ b/clang/lib/Serialization/ASTWriter.cpp
@@ -2021,7 +2021,7 @@ void ASTWriter::WriteHeaderSearch(const HeaderSearch &HS) {
     // from a different module; in that case, we rely on the module(s)
     // containing the header to provide this information.
     const HeaderFileInfo *HFI =
-        HS.getExistingFileInfo(*File, /*WantExternal*/!Chain);
+        HS.getExistingFileInfo(*File, /*WantExternal*/ !Chain);
     if (!HFI || (HFI->isModuleHeader && !HFI->isCompilingModuleHeader))
       continue;
 
@@ -2037,12 +2037,13 @@ void ASTWriter::WriteHeaderSearch(const HeaderSearch &HS) {
 
     bool Included = PP->alreadyIncluded(*File);
 
-    HeaderFileInfoTrait::key_type Key = {
-      Filename, File->getSize(), getTimestampForOutput(*File)
-    };
+    HeaderFileInfoTrait::key_type Key = {Filename, File->getSize(),
+                                         getTimestampForOutput(*File)};
     HeaderFileInfoTrait::data_type Data = {
-      *HFI, Included, HS.getModuleMap().findResolvedModulesForHeader(*File), {}
-    };
+        *HFI,
+        Included,
+        HS.getModuleMap().findResolvedModulesForHeader(*File),
+        {}};
     Generator.insert(Key, Data, GeneratorTrait);
     ++NumHeaderSearchEntries;
   }

``````````

</details>


https://github.com/llvm/llvm-project/pull/67383


More information about the cfe-commits mailing list