mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-24 21:14:56 +00:00
Reuse variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191712 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2967a80412
commit
b1d70af7b9
@ -262,7 +262,7 @@ Constant *Module::getOrInsertGlobal(StringRef Name, Type *Ty) {
|
||||
// right type.
|
||||
Type *GVTy = GV->getType();
|
||||
PointerType *PTy = PointerType::get(Ty, GVTy->getPointerAddressSpace());
|
||||
if (GV->getType() != PTy)
|
||||
if (GVTy != PTy)
|
||||
return ConstantExpr::getBitCast(GV, PTy);
|
||||
|
||||
// Otherwise, we just found the existing function or a prototype.
|
||||
|
Loading…
Reference in New Issue
Block a user