================ @@ -4753,15 +4755,12 @@ void ASTWriter::AddString(StringRef Str, RecordDataImpl &Record) { } bool ASTWriter::PreparePathForOutput(SmallVectorImpl<char> &Path) { - assert(Context && "should have context when outputting path"); - // Leave special file names as they are. StringRef PathStr(Path.data(), Path.size()); if (PathStr == "<built-in>" || PathStr == "<command line>") return false; - bool Changed = - cleanPathForOutput(Context->getSourceManager().getFileManager(), Path); + bool Changed = cleanPathForOutput(PP->getFileManager(), Path); ---------------- benlangmuir wrote:
What's your opinion on the use of nullable `PP`? This seems like the same issue as `Context` where it's not obvious where it's mandatory and where it's not. https://github.com/llvm/llvm-project/pull/115235 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits