Closed svenvh closed 5 months ago
Thanks for looking into this @svenvh One quick comment (might be my ignorance). Do we need a nullptr check before dereferencing these pointers?
Thanks
Yes, in most if not all cases, the variable is already dereferenced for getName
, getOperand
or replaceUsesOfWith
calls.
In preparation for LLVM's deprecation of Instruction constructors and Create methods that accept
Instruction
pointers, upgrade call sites to pass an iterator instead of anInstruction
pointer.This patch only upgrades constructor and
Create
calls that were trivial to upgrade with no impact on the test suite. Some calls remain to be upgraded as future work.