mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Allow aliasee to be a GEP or bitcast instead of just a bitcast.
The real fix for this whole mess is to require the operand of the alias to be a *GlobalValue* (not a general constant, including constant exprs) but allow the operand and the alias type to be unrelated. This fixes PR4066 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70079 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -427,7 +427,9 @@ void Verifier::visitGlobalAlias(GlobalAlias &GA) {
|
||||
|
||||
if (!isa<GlobalValue>(GA.getAliasee())) {
|
||||
const ConstantExpr *CE = dyn_cast<ConstantExpr>(GA.getAliasee());
|
||||
Assert1(CE && CE->getOpcode() == Instruction::BitCast &&
|
||||
Assert1(CE &&
|
||||
(CE->getOpcode() == Instruction::BitCast ||
|
||||
CE->getOpcode() == Instruction::GetElementPtr) &&
|
||||
isa<GlobalValue>(CE->getOperand(0)),
|
||||
"Aliasee should be either GlobalValue or bitcast of GlobalValue",
|
||||
&GA);
|
||||
|
Reference in New Issue
Block a user