From 4c5e43da7792f75567b693105cc53e3f1992ad98 Mon Sep 17 00:00:00 2001 From: Pirama Arumuga Nainar Date: Wed, 8 Apr 2015 08:55:49 -0700 Subject: Update aosp/master llvm for rebase to r233350 Change-Id: I07d935f8793ee8ec6b7da003f6483046594bca49 --- unittests/Linker/LinkModulesTest.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'unittests/Linker') diff --git a/unittests/Linker/LinkModulesTest.cpp b/unittests/Linker/LinkModulesTest.cpp index 91f97d76c9..fbd03639fa 100644 --- a/unittests/Linker/LinkModulesTest.cpp +++ b/unittests/Linker/LinkModulesTest.cpp @@ -35,7 +35,7 @@ protected: SwitchCase2BB = BasicBlock::Create(Ctx, "switch.case.2", F); ExitBB = BasicBlock::Create(Ctx, "exit", F); - ArrayType *AT = ArrayType::get(Type::getInt8PtrTy(Ctx), 3); + AT = ArrayType::get(Type::getInt8PtrTy(Ctx), 3); GV = new GlobalVariable(*M.get(), AT, false /*=isConstant*/, GlobalValue::InternalLinkage, nullptr,"switch.bas"); @@ -61,6 +61,7 @@ protected: LLVMContext Ctx; std::unique_ptr M; Function *F; + ArrayType *AT; GlobalVariable *GV; BasicBlock *EntryBB; BasicBlock *SwitchCase1BB; @@ -75,7 +76,7 @@ TEST_F(LinkModuleTest, BlockAddress) { GEPIndices.push_back(ConstantInt::get(Type::getInt32Ty(Ctx), 0)); GEPIndices.push_back(F->arg_begin()); - Value *GEP = Builder.CreateGEP(GV, GEPIndices, "switch.gep"); + Value *GEP = Builder.CreateGEP(AT, GV, GEPIndices, "switch.gep"); Value *Load = Builder.CreateLoad(GEP, "switch.load"); Builder.CreateRet(Load); -- cgit v1.2.3