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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135182 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2011-07-14 20:22:18 +00:00
parent 5427edeb68
commit 0063225bd7

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;
}