@@ -184,9 +184,9 @@ TEST(ConstantsTest, AsInstructionsTest) {
184184 Type *Int16Ty = Type::getInt16Ty (Context);
185185
186186 Constant *Global =
187- M->getOrInsertGlobal (" dummy" , PointerType::getUnqual (Int32Ty ));
187+ M->getOrInsertGlobal (" dummy" , PointerType::getUnqual (Context ));
188188 Constant *Global2 =
189- M->getOrInsertGlobal (" dummy2" , PointerType::getUnqual (Int32Ty ));
189+ M->getOrInsertGlobal (" dummy2" , PointerType::getUnqual (Context ));
190190
191191 Constant *P0 = ConstantExpr::getPtrToInt (Global, Int32Ty);
192192 Constant *P4 = ConstantExpr::getPtrToInt (Global2, Int32Ty);
@@ -222,7 +222,7 @@ TEST(ConstantsTest, AsInstructionsTest) {
222222 // not a normal one!
223223 // CHECK(ConstantExpr::getGetElementPtr(Global, V, false),
224224 // "getelementptr i32*, i32** @dummy, i32 1");
225- CHECK (ConstantExpr::getInBoundsGetElementPtr (PointerType::getUnqual (Int32Ty ),
225+ CHECK (ConstantExpr::getInBoundsGetElementPtr (PointerType::getUnqual (Context ),
226226 Global, V),
227227 " getelementptr inbounds ptr, ptr @dummy, i32 1" );
228228
@@ -250,9 +250,9 @@ TEST(ConstantsTest, ReplaceWithConstantTest) {
250250 Constant *One = ConstantInt::get (Int32Ty, 1 );
251251
252252 Constant *Global =
253- M->getOrInsertGlobal (" dummy" , PointerType::getUnqual (Int32Ty ));
253+ M->getOrInsertGlobal (" dummy" , PointerType::getUnqual (Context ));
254254 Constant *GEP = ConstantExpr::getGetElementPtr (
255- PointerType::getUnqual (Int32Ty ), Global, One);
255+ PointerType::getUnqual (Context ), Global, One);
256256 EXPECT_DEATH (Global->replaceAllUsesWith (GEP),
257257 " this->replaceAllUsesWith\\ (expr\\ (this\\ )\\ ) is NOT valid!" );
258258}
0 commit comments