From b1d70af7b93c1e9161a4e7ca51659a1123c96177 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Mon, 30 Sep 2013 23:31:50 +0000 Subject: Reuse variable git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191712 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/IR/Module.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/IR/Module.cpp b/lib/IR/Module.cpp index f200da8..58115ef 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. -- cgit v1.1