diff options
author | Roman Divacky <rdivacky@FreeBSD.org> | 2009-10-14 17:57:32 +0000 |
---|---|---|
committer | Roman Divacky <rdivacky@FreeBSD.org> | 2009-10-14 17:57:32 +0000 |
commit | 59850d0874429601812bc13408cb1f776649027c (patch) | |
tree | b21f6de4e08b89bb7931806bab798fc2a5e3a686 /unittests/VMCore/ConstantsTest.cpp | |
parent | 18f153bdb9db52e7089a2d5293b96c45a3124a26 (diff) |
Diffstat (limited to 'unittests/VMCore/ConstantsTest.cpp')
-rw-r--r-- | unittests/VMCore/ConstantsTest.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/unittests/VMCore/ConstantsTest.cpp b/unittests/VMCore/ConstantsTest.cpp index 519d928eac166..8f28407b8dec3 100644 --- a/unittests/VMCore/ConstantsTest.cpp +++ b/unittests/VMCore/ConstantsTest.cpp @@ -9,13 +9,14 @@ #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" +#include "llvm/LLVMContext.h" #include "gtest/gtest.h" 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); @@ -96,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()); |