mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +01:00
[NFC] Use Aliasee to determine Type and AddrSpace in GlobalAlias::create()
As opposed to going through the Aliasee type. For opaque pointers, we're trying to remove uses of PointerType::getElementType(). Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D101715
This commit is contained in:
parent
b7eb3dfd3b
commit
2b3350003c
@ -502,8 +502,7 @@ GlobalAlias *GlobalAlias::create(Type *Ty, unsigned AddressSpace,
|
||||
|
||||
GlobalAlias *GlobalAlias::create(LinkageTypes Link, const Twine &Name,
|
||||
GlobalValue *Aliasee) {
|
||||
PointerType *PTy = Aliasee->getType();
|
||||
return create(PTy->getElementType(), PTy->getAddressSpace(), Link, Name,
|
||||
return create(Aliasee->getValueType(), Aliasee->getAddressSpace(), Link, Name,
|
||||
Aliasee);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user