diff options
author | David Blaikie <dblaikie@gmail.com> | 2015-09-14 21:47:27 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2015-09-14 21:47:27 +0000 |
commit | 798f3079d4d24e71b3c2b61ad1c2e6f807d308c0 (patch) | |
tree | 42b1369ab036ab15f412eea60a9ac70f0e7a2408 /llvm/lib/IR/Globals.cpp | |
parent | 6b2a61d3a5c1c1ac968e0593b8d9151207216882 (diff) | |
download | bcm5719-llvm-798f3079d4d24e71b3c2b61ad1c2e6f807d308c0.tar.gz bcm5719-llvm-798f3079d4d24e71b3c2b61ad1c2e6f807d308c0.zip |
[opaque pointer types] Add an explicit value type to GlobalObject
This is needed by all GlobalObjects (GlobalAlias, Function,
GlobalVariable), see the GlobalObject::getValueType which is used in
many places. If at some point that can be removed, then we can remove
this member.
llvm-svn: 247621
Diffstat (limited to 'llvm/lib/IR/Globals.cpp')
-rw-r--r-- | llvm/lib/IR/Globals.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/Globals.cpp b/llvm/lib/IR/Globals.cpp index 28f223593a8..11ece2ed1b1 100644 --- a/llvm/lib/IR/Globals.cpp +++ b/llvm/lib/IR/Globals.cpp @@ -234,8 +234,8 @@ void GlobalVariable::copyAttributesFrom(const GlobalValue *Src) { GlobalAlias::GlobalAlias(Type *Ty, unsigned AddressSpace, LinkageTypes Link, const Twine &Name, Constant *Aliasee, Module *ParentModule) - : GlobalValue(PointerType::get(Ty, AddressSpace), Value::GlobalAliasVal, - &Op<0>(), 1, Link, Name) { + : GlobalValue(Ty, Value::GlobalAliasVal, &Op<0>(), 1, Link, Name, + AddressSpace) { Op<0>() = Aliasee; if (ParentModule) |