NULL in non-zero address spaces is dereferenceable/etc, so we probably shouldn't be assuming that its objectsize is zero.
arsenm: pulling you in to confirm that this change isn't breaking code you care about somehow (re: the comment from you on https://reviews.llvm.org/D28494 ). If this does break something, I'm happy to try and find some middle-ground. I'm sort of assuming the intent of that comment was more along the lines of "if this is a gcc-compat hack, we should limit it to addrspace(0), which is presumably the only place where we care," though.