This was allowing getelementptr with offsets, which doesn't make sense. My initial attempt to use stripPointerCasts broke a few tests involving aliases; add a new targeted verifier test for aliases. This also provides the fix from D138537 for free, and also adds support for addrspacecast (D138538) for free. Merge the tests in from those. I'm not really sure why findBaseObject exists; it seems redundant with stripPointerCasts* (I'm also not really sure why getelementptrs are allowed off of functions).
This directory contains testcases that the verifier is supposed to detect as malformed LLVM code. Testcases for situations that the verifier incorrectly identifies as malformed should go in the test/Assembler directory.