diff --git a/llvm/lib/VMCore/Globals.cpp b/llvm/lib/VMCore/Globals.cpp index 76fc5a949235..db008e09d1c8 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(this)) return F->empty(); - const GlobalAlias *GA = cast(this); - if (const GlobalValue *AV = GA->getAliasedGlobal()) - return AV->isDeclaration(); + // Aliases are always definitions. + assert(isa(this)); return false; }