Clang generates alias for getelementptr for vtable access. But the function ConstantFoldLoadFromConstPtr fails for GlobalAlias. It breaks devirtualization even in simple cases.
This patch fixes the problem.
Devirtualization fails only for MicrosoftCXXABI because it generates aliases for vtable access.
Problem was found during investigation of https://llvm.org/bugs/show_bug.cgi?id=20801.
You can use auto for the LHS.