mirror of
https://github.com/RPCS3/llvm.git
synced 2025-04-08 08:21:54 +00:00
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:
parent
5427edeb68
commit
0063225bd7
@ -71,9 +71,8 @@ bool GlobalValue::isDeclaration() const {
|
|||||||
if (const Function *F = dyn_cast<Function>(this))
|
if (const Function *F = dyn_cast<Function>(this))
|
||||||
return F->empty();
|
return F->empty();
|
||||||
|
|
||||||
const GlobalAlias *GA = cast<GlobalAlias>(this);
|
// Aliases are always definitions.
|
||||||
if (const GlobalValue *AV = GA->getAliasedGlobal())
|
assert(isa<GlobalAlias>(this));
|
||||||
return AV->isDeclaration();
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user