Only consider aliases that themselves aren't interposable and alias to
something that isn't interposable.
MSVC-style RTTI uses GEPs through local aliases for vtables.
With this patch, we can simplify the following C++ code into just one
function with a constant return value:
namespace {
struct A {
virtual int f() = 0;
virtual ~A() = default;
};
struct B: A {
virtual int f() override { return 41; }
virtual ~B() = default;
};
}
int foo() {
std::unique_ptr<A> a = std::make_unique<B>();
return a->f();
}
I wonder if it would be safe to power up all of the other versions of pointer stripping to look through local aliases.