[all-commits] [llvm/llvm-project] f09ccf: [ThinLTO] Fix a metadata lost issue with DICompile...

Hongtao Yu via All-commits all-commits at lists.llvm.org
Wed Sep 2 14:41:09 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f09ccf89fbee976bcca77b374f69987c2e96e1ce
      https://github.com/llvm/llvm-project/commit/f09ccf89fbee976bcca77b374f69987c2e96e1ce
  Author: Hongtao Yu <hoy at fb.com>
  Date:   2020-09-02 (Wed, 02 Sep 2020)

  Changed paths:
    M llvm/lib/Linker/IRMover.cpp
    A llvm/test/ThinLTO/X86/Inputs/import-metadata.ll
    A llvm/test/ThinLTO/X86/import-metadata.ll

  Log Message:
  -----------
  [ThinLTO] Fix a metadata lost issue with DICompileUnit import.

For ThinLTO importing we don't need to import all the fields of the DICompileUnit, such as enums, macros, retained types lists. The importation of those fields were previously disabled by setting their value map entries to nullptr. Unfortunately a metadata node can be shared by multiple metadata operands. Setting the map entry to nullptr might result in not importing other metadata unexpectedly.  The issue is fixed by explicitly setting the original DICompileUnit fields (still a copy of the source module metadata) to null.

Reviewed By: wenlei, dblaikie

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




More information about the All-commits mailing list