[PATCH] D100619: [ASTReader] Only mark module out of date if not already compiled
Ben Barham via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 15 21:36:37 PDT 2021
bnbarham created this revision.
bnbarham added a reviewer: akyrtzi.
bnbarham requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
If a module contains errors (ie. it was built with
-fallow-pcm-with-compiler-errors and had errors) and was from the module
cache, it is marked as out of date - see
a2c1054c303f20be006e9ef20739dbb88bd9ae02 <https://reviews.llvm.org/rGa2c1054c303f20be006e9ef20739dbb88bd9ae02>.
When a module is imported multiple times in the one compile, this caused
it to be recompiled each time - removing the existing buffer from the
module cache and replacing it. This results in various errors further
down the line.
Instead, only mark the module as out of date if it isn't already
finalized in the module cache.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D100619
Files:
clang/lib/Serialization/ASTReader.cpp
clang/test/Modules/Inputs/error/error.h
clang/test/Modules/Inputs/error/module.modulemap
clang/test/Modules/Inputs/error/use_error_a.h
clang/test/Modules/Inputs/error/use_error_b.h
clang/test/Modules/load-module-with-errors.m
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100619.337982.patch
Type: text/x-patch
Size: 9087 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210416/3281ed22/attachment-0001.bin>
More information about the cfe-commits
mailing list