In getArgumentAlignment check if the ImmutableCallSite pointer CS is non-null before dereferencing. If CS is 0x0 fall back to the ABI type alignment else compute the alignment as before.
Cool. I didn't know the review system allows having the patch updated like this :) It still reports me as the author and you as a subscriber. I don't think that matters.
There is a preference to early exits. So perhaps:
if (!CS) return DL.getABITTypeAlignment(Ty);
Move this to a new line to avoid exceeding 80 chars.
There are a couple of other formatting changes needed to. The simplest way is to use clang-format. To have the changes you added reformatted you could use clang-format-diff.py:
Could you add a comment explaining what this test is testing?
So this test case would fail previously (dereference null pointer) and now pass (return error)?
You don't own revision D9168: "[NVPTX] Check if callsite is defined when computing argument allignment". Normally, you should only update revisions you own. You can "Commandeer" this revision from the web interface if you want to become the owner.
I was not able to figure out how to comandeer a revision, so i just went ahead and pushed it.