llvm-project/llvm/lib/Bitcode/Writer
Stephen Tozer e5d844b587 [Bitcode] Ensure DIArgList in bitcode has no null or forward metadata refs
This patch fixes an issue in which ConstantAsMetadata arguments to a
DIArglist, as well as the Constant values referenced by that metadata,
would not be always be emitted correctly into bitcode. This patch fixes
this issue firstly by searching for ConstantAsMetadata in DIArgLists
(previously we would only search for them when directly wrapped in
MetadataAsValue), and secondly by enumerating all of a DIArgList's
arguments directly prior to enumerating the DIArgList itself.

This patch also adds a number of asserts, and no longer treats the
arguments to a DIArgList as optional fields when reading/writing to
bitcode.

Differential Revision: https://reviews.llvm.org/D100572
2021-04-22 12:03:33 +01:00
..
BitWriter.cpp
BitcodeWriter.cpp [Bitcode] Ensure DIArgList in bitcode has no null or forward metadata refs 2021-04-22 12:03:33 +01:00
BitcodeWriterPass.cpp Revert "Move ModuleSummaryAnalysis from libAnalysis to libObject to break the dependency from Analysis to Object" 2020-04-14 00:27:08 +00:00
CMakeLists.txt llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
ValueEnumerator.cpp [Bitcode] Ensure DIArgList in bitcode has no null or forward metadata refs 2021-04-22 12:03:33 +01:00
ValueEnumerator.h [Bitcode] Ensure DIArgList in bitcode has no null or forward metadata refs 2021-04-22 12:03:33 +01:00