mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-27 14:07:32 +00:00
Let Verifier check aliasees
llvm-svn: 36540
This commit is contained in:
parent
349097160e
commit
2070ca3361
@ -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
Block a user