projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5427ede
)
Fix GlobalValue::isDeclaration() to always consider aliases to be definitions.
author
Chris Lattner
<sabre@nondot.org>
Thu, 14 Jul 2011 20:22:18 +0000
(20:22 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Thu, 14 Jul 2011 20:22:18 +0000
(20:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135182
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/Globals.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/Globals.cpp
b/lib/VMCore/Globals.cpp
index 76fc5a9492352690a193742f7a1604ceef60d8f9..db008e09d1c86dcff43ec3476038f00944b01ab5 100644
(file)
--- 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;
}