diff --git a/unittests/ExecutionEngine/JIT/JITTest.cpp b/unittests/ExecutionEngine/JIT/JITTest.cpp index abfe9313470..d5aa0914fb7 100644 --- a/unittests/ExecutionEngine/JIT/JITTest.cpp +++ b/unittests/ExecutionEngine/JIT/JITTest.cpp @@ -75,7 +75,7 @@ TEST(JIT, GlobalInFunction) { GTy, false, // Not constant. GlobalValue::InternalLinkage, - context.getNullValue(GTy), + Constant::getNullValue(GTy), "myglobal"); // Make a function that points to a global. diff --git a/unittests/Support/ValueHandleTest.cpp b/unittests/Support/ValueHandleTest.cpp index 833c68405be..d9a5515f78e 100644 --- a/unittests/Support/ValueHandleTest.cpp +++ b/unittests/Support/ValueHandleTest.cpp @@ -312,11 +312,11 @@ TEST_F(ValueHandle, CallbackVH_DeletionCanRAUW) { RVH = BitcastV.get(); std::auto_ptr BitcastUser( BinaryOperator::CreateAdd(RVH, - getGlobalContext().getNullValue(Type::Int32Ty))); + Constant::getNullValue(Type::Int32Ty))); EXPECT_EQ(BitcastV.get(), BitcastUser->getOperand(0)); BitcastV.reset(); // Would crash without the ValueHandler. - EXPECT_EQ(getGlobalContext().getNullValue(Type::Int32Ty), RVH.AURWArgument); - EXPECT_EQ(getGlobalContext().getNullValue(Type::Int32Ty), + EXPECT_EQ(Constant::getNullValue(Type::Int32Ty), RVH.AURWArgument); + EXPECT_EQ(Constant::getNullValue(Type::Int32Ty), BitcastUser->getOperand(0)); }