Unverified Commit 6cb66ee5 authored by Stephen Tozer's avatar Stephen Tozer Committed by GitHub
Browse files

[RemoveDIs][DebugInfo] Handle RAUW from dead constants (#80837)

Ensure that when a constant value dies, all ValueAsMetadata uses of that
constant in a DebugValueUser will be replaced with a PoisonValue instead
of a nullptr. This has little visible effect currently, as any nullptr metadata
uses in a DebugValueUser would be converted to an empty MDNode in
the end anyway, but this patch adds an assert that would be triggered by
two existing tests without the functional component of this patch:

  llvm/test/Transforms/Inline/delete-function-with-metadata-use.ll
  llvm/test/DebugInfo/X86/array2.ll
parent f37d81f8
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment