Minor comments and overall fine approach. Could you update the test so I can accept it? Later I will assume changes like this are made before it is commited.
You can even move the code to the beginning of the function (see my comment below as well).
Nit: I personally prefer conditionals to have braces in all parts or no braces at all. I get itchy when we have a branch with and one without.
|81 ↗||(On Diff #231043)|
I think we settled on CreateXXX as naming scheme to match the IRBuilder for now.
|250 ↗||(On Diff #231043)|
Can you adopt the scheme below (w/o assert for now)
if (!updateToLocation(Loc)) return;
I'm not certain why we support an "invalid" insertion point but the update method also sets the debug information properly.