================
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to