[llvm-commits] [llvm] r135182 - /llvm/trunk/lib/VMCore/Globals.cpp
Chris Lattner
sabre at nondot.org
Thu Jul 14 13:22:18 PDT 2011
Author: lattner
Date: Thu Jul 14 15:22:18 2011
New Revision: 135182
URL: http://llvm.org/viewvc/llvm-project?rev=135182&view=rev
Log:
Fix GlobalValue::isDeclaration() to always consider aliases to be definitions.
Modified:
llvm/trunk/lib/VMCore/Globals.cpp
Modified: llvm/trunk/lib/VMCore/Globals.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Globals.cpp?rev=135182&r1=135181&r2=135182&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Globals.cpp (original)
+++ llvm/trunk/lib/VMCore/Globals.cpp Thu Jul 14 15:22:18 2011
@@ -71,9 +71,8 @@
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;
}
More information about the llvm-commits
mailing list