[PATCH] D134249: [modules] Fix error "malformed or corrupted AST file: 'SourceLocation remap refers to unknown module...'".
Volodymyr Sapsai via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 19 18:31:09 PDT 2022
vsapsai created this revision.
vsapsai added reviewers: bnbarham, ChuanqiXu.
Herald added a subscriber: ributzka.
Herald added a project: All.
vsapsai requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
When a framework can be found at a new location, all references to it in
the module cache become outdated. When we try to load such outdated .pcm
file, we shouldn't change any already loaded and processed modules.
If `Module` has `ASTFile`, it means we've read its AST block already and
it is too late to undo that. If `ASTFile` is `None`, there is no value
in setting it to `None` again. So we don't reset `ASTFile` in
`ModuleManager::removeModules` at all.
rdar://97216258
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D134249
Files:
clang/include/clang/Basic/Module.h
clang/include/clang/Serialization/ModuleManager.h
clang/lib/Serialization/ASTReader.cpp
clang/lib/Serialization/ModuleManager.cpp
clang/test/Modules/dependent-module-different-location.m
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134249.461435.patch
Type: text/x-patch
Size: 4679 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220920/0eb161a3/attachment-0001.bin>
More information about the cfe-commits
mailing list