Unverified Commit 7ef433f6 authored by Jeremy Morse's avatar Jeremy Morse Committed by GitHub
Browse files

[NFC][RemoveDIs] Switch ConstantExpr::getAsInstruction to not insert (#84737)

Because the RemoveDIs work is putting a debug-info bit into
BasicBlock::iterator and iterators are needed for insertion, the
getAsInstruction method declaration would need to use a fully defined
instruction-iterator, which leads to a complicated
header-inclusion-order problem. Much simpler to instead just not insert,
and make it the callers problem to insert.

This is proportionate because there are only four call-sites to
getAsInstruction -- it would suck if we did this everywhere.

---------

Merged by: Stephen Tozer <stephen.tozer@sony.com>
parent 4aec1438
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