[llvm] [ThinLTOBitcodeWriter] Do not crash on a typed declaration (PR #69564)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 19 10:29:52 PDT 2023


teresajohnson wrote:

> This fixes a crash when `splitAndWriteThinLTOBitcode()` hits a declaration with type metadata. For example, such declarations can be generated by the `EliminateAvailableExternally` pass.

Normally we explicitly disable the EliminateAvailableExternally pass before writing ThinLTO bitcode as we do not want these eliminated before LTO (see https://github.com/llvm/llvm-project/blob/6b8a1425eafce38f2c2ba2269c473a12cb825cb2/llvm/lib/Passes/PassBuilderPipelines.cpp#L1304-L1314).

What configuration provoked this failure?

https://github.com/llvm/llvm-project/pull/69564


More information about the llvm-commits mailing list