[all-commits] [llvm/llvm-project] f3b344: [clang][CrossTU] Invalidate parent map after get c...

Balázs Kéri via All-commits all-commits at lists.llvm.org
Wed Jul 1 00:11:07 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f3b34466104877b024e168cac054bded6b9279a0
      https://github.com/llvm/llvm-project/commit/f3b34466104877b024e168cac054bded6b9279a0
  Author: Balázs Kéri <1.int32 at gmail.com>
  Date:   2020-07-01 (Wed, 01 Jul 2020)

  Changed paths:
    M clang/lib/CrossTU/CrossTranslationUnit.cpp
    M clang/unittests/CrossTU/CrossTranslationUnitTest.cpp

  Log Message:
  -----------
  [clang][CrossTU] Invalidate parent map after get cross TU definition.

Summary:
Parent map of ASTContext is built once. If this happens and later
the TU is modified by getCrossTUDefinition the parent map does not
contain the newly imported objects and has to be re-created.

Invalidation of the parent map is added to the CrossTranslationUnitContext.
It could be added to ASTImporter as well but for now this task remains the
responsibility of the user of ASTImporter. Reason for this is mostly that
ASTImporter calls itself recursively.

Reviewers: gamesh411, martong

Reviewed By: gamesh411

Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, martong, cfe-commits

Tags: #clang

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




More information about the All-commits mailing list