[all-commits] [llvm/llvm-project] e12f6c: [modules] Fix error "malformed or corrupted AST fi...
Volodymyr Sapsai via All-commits
all-commits at lists.llvm.org
Tue Sep 20 17:56:34 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e12f6c26c394bd5b49e7c1e1c157bcee3a33d1de
https://github.com/llvm/llvm-project/commit/e12f6c26c394bd5b49e7c1e1c157bcee3a33d1de
Author: Volodymyr Sapsai <vsapsai at apple.com>
Date: 2022-09-20 (Tue, 20 Sep 2022)
Changed paths:
M clang/include/clang/Basic/Module.h
M clang/include/clang/Serialization/ModuleManager.h
M clang/lib/Serialization/ASTReader.cpp
M clang/lib/Serialization/ModuleManager.cpp
A clang/test/Modules/dependent-module-different-location.m
Log Message:
-----------
[modules] Fix error "malformed or corrupted AST file: 'SourceLocation remap refers to unknown module...'".
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
Differential Revision: https://reviews.llvm.org/D134249
More information about the All-commits
mailing list