From a90a340fbb61e1c7c3fef7b7c6189d9d27e2bfb1 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Mon, 30 Sep 2013 23:31:50 +0000 Subject: Reuse variable llvm-svn: 191712 --- llvm/lib/IR/Module.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/IR/Module.cpp') 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. -- cgit v1.1