Push LLVMContexts through the IntegerType APIs.
[oota-llvm.git] / unittests / VMCore / ConstantsTest.cpp
index 42bb6cc2ecd17f685d70d70b7f3c0255abfd4026..8f28407b8dec332f64a1e9687de5812bccd7fc74 100644 (file)
@@ -16,7 +16,7 @@ namespace llvm {
 namespace {
 
 TEST(ConstantsTest, Integer_i1) {
-  const IntegerType* Int1 = IntegerType::get(1);
+  const IntegerType* Int1 = IntegerType::get(getGlobalContext(), 1);
   Constant* One = ConstantInt::get(Int1, 1, true);
   Constant* Zero = ConstantInt::get(Int1, 0);
   Constant* NegOne = ConstantInt::get(Int1, static_cast<uint64_t>(-1), true);
@@ -97,7 +97,7 @@ TEST(ConstantsTest, Integer_i1) {
 }
 
 TEST(ConstantsTest, IntSigns) {
-  const IntegerType* Int8Ty = Type::Int8Ty;
+  const IntegerType* Int8Ty = Type::getInt8Ty(getGlobalContext());
   EXPECT_EQ(100, ConstantInt::get(Int8Ty, 100, false)->getSExtValue());
   EXPECT_EQ(100, ConstantInt::get(Int8Ty, 100, true)->getSExtValue());
   EXPECT_EQ(100, ConstantInt::getSigned(Int8Ty, 100)->getSExtValue());