[all-commits] [llvm/llvm-project] 1206b9: [ASTReader] Only mark module out of date if not al...

Ben Barham via All-commits all-commits at lists.llvm.org
Fri Apr 16 17:58:00 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1206b95e0703dc0a9b619a095d5564ac51c39d19
      https://github.com/llvm/llvm-project/commit/1206b95e0703dc0a9b619a095d5564ac51c39d19
  Author: Ben Barham <ben_barham at apple.com>
  Date:   2021-04-16 (Fri, 16 Apr 2021)

  Changed paths:
    M clang/lib/Serialization/ASTReader.cpp
    M clang/test/Modules/Inputs/error/error.h
    M clang/test/Modules/Inputs/error/module.modulemap
    A clang/test/Modules/Inputs/error/use_error_a.h
    A clang/test/Modules/Inputs/error/use_error_b.h
    M clang/test/Modules/load-module-with-errors.m

  Log Message:
  -----------
  [ASTReader] Only mark module out of date if not already compiled

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.

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.

Reviewed By: akyrtzi

Differential Revision: https://reviews.llvm.org/D100619




More information about the All-commits mailing list