Fix GlobalValue::isDeclaration() to always consider aliases to be definitions.

llvm-svn: 135182
This commit is contained in:
Chris Lattner 2011-07-14 20:22:18 +00:00
parent 08ad085712
commit 81210d232d
1 changed files with 2 additions and 3 deletions

View File

@ -71,9 +71,8 @@ bool GlobalValue::isDeclaration() const {
if (const Function *F = dyn_cast<Function>(this))
return F->empty();
const GlobalAlias *GA = cast<GlobalAlias>(this);
if (const GlobalValue *AV = GA->getAliasedGlobal())
return AV->isDeclaration();
// Aliases are always definitions.
assert(isa<GlobalAlias>(this));
return false;
}