================
@@ -6339,15 +6339,16 @@ llvm::Error ASTReader::ReadSubmoduleBlock(ModuleFile &F,
"too many submodules");
if (!ParentModule) {
- if (OptionalFileEntryRef CurFile = CurrentModule->getASTFile()) {
+ if (const ModuleFileKey *CurFileKey = CurrentModule->getASTFileKey()) {
// Don't emit module relocation error if we have -fno-validate-pch
if (!bool(PP.getPreprocessorOpts().DisablePCHOrModuleValidation &
DisableValidationForModuleKind::Module)) {
- assert(CurFile != F.File && "ModuleManager did not de-duplicate");
+ assert(*CurFileKey != F.FileKey &&
+ "ModuleManager did not de-duplicate");
Diag(diag::err_module_file_conflict)
- << CurrentModule->getTopLevelModuleName() << CurFile->getName()
- << F.File.getName();
+ << CurrentModule->getTopLevelModuleName()
+ << *CurrentModule->getASTFileName() << F.FileName;
----------------
benlangmuir wrote:
The key and name can only be set together. The fact `getASTFileKey()` is set
here means the name cannot be null. Maybe worth an assert, but it is correct
AFAICT.
https://github.com/llvm/llvm-project/pull/185994
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits