Check for validity of aliasee pointer before dereference.

llvm-svn: 50878
This commit is contained in:
Anton Korobeynikov 2008-05-08 23:11:06 +00:00
parent 0360ecbec1
commit a50eed4af9
1 changed files with 3 additions and 1 deletions

View File

@ -367,6 +367,8 @@ void Verifier::visitGlobalAlias(GlobalAlias &GA) {
Assert1(GA.hasExternalLinkage() || GA.hasInternalLinkage() ||
GA.hasWeakLinkage(),
"Alias should have external or external weak linkage!", &GA);
Assert1(GA.getAliasee(),
"Aliasee cannot be NULL!", &GA);
Assert1(GA.getType() == GA.getAliasee()->getType(),
"Alias and aliasee types should match!", &GA);