mirror of
https://github.com/intel/llvm.git
synced 2026-02-07 07:39:11 +08: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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user