X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FCodeGen%2FGlobalMerge.cpp;h=41953839010212db41df364822df84585cc7cbf2;hb=19443c1bcb863ba186abfe0bda3a1603488d17f7;hp=32543b7723abe3b862f9e15a1f917ce6b5937987;hpb=fa8f2103a5878b63296b4d521aa68ea7f4d6aed9;p=oota-llvm.git diff --git a/lib/CodeGen/GlobalMerge.cpp b/lib/CodeGen/GlobalMerge.cpp index 32543b7723a..41953839010 100644 --- a/lib/CodeGen/GlobalMerge.cpp +++ b/lib/CodeGen/GlobalMerge.cpp @@ -222,7 +222,8 @@ bool GlobalMerge::doMerge(SmallVectorImpl &Globals, ConstantInt::get(Int32Ty, 0), ConstantInt::get(Int32Ty, k-i) }; - Constant *GEP = ConstantExpr::getInBoundsGetElementPtr(MergedGV, Idx); + Constant *GEP = + ConstantExpr::getInBoundsGetElementPtr(MergedTy, MergedGV, Idx); Globals[k]->replaceAllUsesWith(GEP); Globals[k]->eraseFromParent();