HomePhabricator

[ThinLTO] Fix a metadata lost issue with DICompileUnit import.

Authored by hoy on Sep 2 2020, 9:51 AM.

Description

[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

Details

Committed
hoySep 2 2020, 2:40 PM
Reviewer
wenlei
Differential Revision
D86675: [ThinLTO] Fix a metadata lost issue with DICompileUnit import.
Parents
rGde6caf871be7: run in terminal
Branches
Unknown
Tags
Unknown