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