summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/VMCore/Globals.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/VMCore/Globals.cpp b/llvm/lib/VMCore/Globals.cpp
index 76fc5a94923..db008e09d1c 100644
--- a/llvm/lib/VMCore/Globals.cpp
+++ b/llvm/lib/VMCore/Globals.cpp
@@ -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;
}
OpenPOWER on IntegriCloud