summaryrefslogtreecommitdiff
path: root/unittests/VMCore/MetadataTest.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-08-13 21:58:54 +0000
committerOwen Anderson <resistor@mac.com>2009-08-13 21:58:54 +0000
commit1d0be15f89cb5056e20e2d24faa8d6afb1573bca (patch)
tree2cdabe223bfce83bd12e10dd557147a2f68c9bf8 /unittests/VMCore/MetadataTest.cpp
parentd163e8b14c8aa5bbbb129e3f0dffdbe7213a3c72 (diff)
downloadllvm-1d0be15f89cb5056e20e2d24faa8d6afb1573bca.tar.gz
llvm-1d0be15f89cb5056e20e2d24faa8d6afb1573bca.tar.bz2
llvm-1d0be15f89cb5056e20e2d24faa8d6afb1573bca.tar.xz
Push LLVMContexts through the IntegerType APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78948 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/VMCore/MetadataTest.cpp')
-rw-r--r--unittests/VMCore/MetadataTest.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/unittests/VMCore/MetadataTest.cpp b/unittests/VMCore/MetadataTest.cpp
index 22519f9f30..15a128bc44 100644
--- a/unittests/VMCore/MetadataTest.cpp
+++ b/unittests/VMCore/MetadataTest.cpp
@@ -105,8 +105,8 @@ TEST(MDNodeTest, Simple) {
}
TEST(MDNodeTest, Delete) {
- Constant *C = ConstantInt::get(Type::Int32Ty, 1);
- Instruction *I = new BitCastInst(C, Type::Int32Ty);
+ Constant *C = ConstantInt::get(Type::getInt32Ty(getGlobalContext()), 1);
+ Instruction *I = new BitCastInst(C, Type::getInt32Ty(getGlobalContext()));
Value *const V = I;
MDNode *n = MDNode::get(Context, &V, 1);
@@ -122,8 +122,8 @@ TEST(MDNodeTest, Delete) {
}
TEST(NamedMDNodeTest, Search) {
- Constant *C = ConstantInt::get(Type::Int32Ty, 1);
- Constant *C2 = ConstantInt::get(Type::Int32Ty, 2);
+ Constant *C = ConstantInt::get(Type::getInt32Ty(getGlobalContext()), 1);
+ Constant *C2 = ConstantInt::get(Type::getInt32Ty(getGlobalContext()), 2);
Value *const V = C;
Value *const V2 = C2;
@@ -134,7 +134,7 @@ TEST(NamedMDNodeTest, Search) {
Module *M = new Module("MyModule", getGlobalContext());
const char *Name = "llvm.NMD1";
- NamedMDNode *NMD = NamedMDNode::Create(Name, &Nodes[0], 2, M);
+ NamedMDNode *NMD = NamedMDNode::Create(getGlobalContext(), Name, &Nodes[0], 2, M);
std::ostringstream oss;
NMD->print(oss);
EXPECT_STREQ("!llvm.NMD1 = !{!0, !1}\n!0 = metadata !{i32 1}\n"