forked from OSchip/llvm-project
parent
b19636e4af
commit
7b2a2f9075
|
@ -319,6 +319,13 @@ void Verifier::visitGlobalAlias(GlobalAlias &GA) {
|
|||
Assert1(GA.getType() == GA.getAliasee()->getType(),
|
||||
"Alias and aliasee types should match!", &GA);
|
||||
|
||||
if (!isa<GlobalValue>(GA.getAliasee())) {
|
||||
const ConstantExpr *CE = dyn_cast<ConstantExpr>(GA.getAliasee());
|
||||
Assert1(CE && CE->getOpcode() == Instruction::BitCast,
|
||||
"Aliasee should be either GlobalValue or bitcast of GlobalValue",
|
||||
&GA);
|
||||
}
|
||||
|
||||
visitGlobalValue(GA);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue