[all-commits] [llvm/llvm-project] 2c9dbc: [modules] Correctly parse LateParsedTemplates in c...

Vaibhav Garg via All-commits all-commits at lists.llvm.org
Fri Sep 4 04:39:56 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2c9dbcda4f71497d4a58020bb093af438fb6e967
      https://github.com/llvm/llvm-project/commit/2c9dbcda4f71497d4a58020bb093af438fb6e967
  Author: Vaibhav Garg <gargvaibhav64 at gmail.com>
  Date:   2020-09-04 (Fri, 04 Sep 2020)

  Changed paths:
    M clang/include/clang/Serialization/ASTReader.h
    M clang/lib/Serialization/ASTReader.cpp

  Log Message:
  -----------
  [modules] Correctly parse LateParsedTemplates in case of dependent modules.

While parsing LateParsedTemplates, Clang assumes that the Global DeclID matches
with the Local DeclID of a Decl. This is not the case when we have multiple
dependent modules , each having their own LateParsedTemplate section. In such a
case, a Local/Global DeclID confusion occurs which leads to improper casting of
FunctionDecl's.

This commit creates a Vector to map the LateParsedTemplate section of each
Module with their module file and therefore resolving the Global/Local DeclID
confusion.

Reviewed By: rsmith

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




More information about the All-commits mailing list