mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-07 03:40:35 +00:00
Reuse variable
llvm-svn: 191712
This commit is contained in:
parent
a352cdea56
commit
c27397065a
@ -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