forked from OSchip/llvm-project
Fix GlobalValue::isDeclaration() to always consider aliases to be definitions.
llvm-svn: 135182
This commit is contained in:
parent
08ad085712
commit
81210d232d
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue