summaryrefslogtreecommitdiff
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
commitb1d70af7b93c1e9161a4e7ca51659a1123c96177 (patch)
tree4744c6c86d729cc2091639f93387bfb40193ef9f
parent2967a804126c6081a18d8b75adf2d9fd5a3c096e (diff)
downloadllvm-b1d70af7b93c1e9161a4e7ca51659a1123c96177.tar.gz
llvm-b1d70af7b93c1e9161a4e7ca51659a1123c96177.tar.bz2
llvm-b1d70af7b93c1e9161a4e7ca51659a1123c96177.tar.xz
Reuse variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191712 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/IR/Module.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/IR/Module.cpp b/lib/IR/Module.cpp
index f200da8923..58115efdc3 100644
--- a/lib/IR/Module.cpp
+++ b/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.