[clang] [clang] Store the Input PCH Path Using Absolute Paths in a PCH (PR #178781)

Qiongsi Wu via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 30 10:21:04 PST 2026


================
@@ -6115,7 +6118,13 @@ ASTFileSignature ASTWriter::WriteASTCore(Sema *SemaPtr, StringRef isysroot,
 
         endian::Writer LE(Out, llvm::endianness::little);
         LE.write<uint8_t>(static_cast<uint8_t>(M.Kind));
-        StringRef Name = M.isModule() ? M.ModuleName : M.FileName;
+        SmallString<128> Name;
+        if (M.isModule())
----------------
qiongsiwu wrote:

Yes you are indeed correct! See the documentation of the method `isModule()`(https://github.com/llvm/llvm-project/blob/3f679962017e376f967105f14dfb3d2f72b5ad6f/clang/include/clang/Serialization/ModuleFile.h#L509). I will add a comment here as well.  

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


More information about the cfe-commits mailing list