[ASTReader] Only mark module out of date if not already compiledIf a module contains errors (ie. it was built with-fallow-pcm-with-compiler-errors and had errors) and was from the modulecache, it
[ASTReader] Only mark module out of date if not already compiledIf a module contains errors (ie. it was built with-fallow-pcm-with-compiler-errors and had errors) and was from the modulecache, it is marked as out of date - seea2c1054c303f20be006e9ef20739dbb88bd9ae02.When a module is imported multiple times in the one compile, this causedit to be recompiled each time - removing the existing buffer from themodule cache and replacing it. This results in various errors furtherdown the line.Instead, only mark the module as out of date if it isn't alreadyfinalized in the module cache.Reviewed By: akyrtziDifferential Revision: https://reviews.llvm.org/D100619
show more ...
[ASTReader] Always rebuild a cached module that has errorsA module in the cache with an error should just be a cache miss. Ifallowing errors (with -fallow-pcm-with-compiler-errors), a rebuild isn
[ASTReader] Always rebuild a cached module that has errorsA module in the cache with an error should just be a cache miss. Ifallowing errors (with -fallow-pcm-with-compiler-errors), a rebuild isneeded so that the appropriate diagnostics are output and in case searchpaths have changed. If not allowing errors, the module was built*allowing* errors and thus should be rebuilt regardless.Reviewed By: akyrtziDifferential Revision: https://reviews.llvm.org/D95989