aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Module.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2013-09-30 23:31:50 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2013-09-30 23:31:50 +0000
commita90a340fbb61e1c7c3fef7b7c6189d9d27e2bfb1 (patch)
tree551fe0448f5fa94386844d961b2f5f6f34d00b09 /llvm/lib/IR/Module.cpp
parentf0b6288cbf61b7b4bbce473690f89fc256a547ab (diff)
downloadllvm-a90a340fbb61e1c7c3fef7b7c6189d9d27e2bfb1.zip
llvm-a90a340fbb61e1c7c3fef7b7c6189d9d27e2bfb1.tar.gz
llvm-a90a340fbb61e1c7c3fef7b7c6189d9d27e2bfb1.tar.bz2
Reuse variable
llvm-svn: 191712
Diffstat (limited to 'llvm/lib/IR/Module.cpp')
-rw-r--r--llvm/lib/IR/Module.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/Module.cpp b/llvm/lib/IR/Module.cpp
index f200da8..58115ef 100644
--- a/llvm/lib/IR/Module.cpp
+++ b/llvm/lib/IR/Module.cpp
@@ -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.