mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Derive MDNode from MetadataBase instead of Constant. Emit MDNodes into METADATA_BLOCK in bitcode file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76834 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -101,25 +101,6 @@ TEST(MDNodeTest, Simple) {
|
||||
oss2.str().c_str());
|
||||
}
|
||||
|
||||
TEST(MDNodeTest, RAUW) {
|
||||
Constant *C = getGlobalContext().getConstantInt(Type::Int32Ty, 1);
|
||||
Instruction *I = new BitCastInst(C, Type::Int32Ty);
|
||||
|
||||
Value *const V1 = I;
|
||||
MDNode *n1 = getGlobalContext().getMDNode(&V1, 1);
|
||||
WeakVH wn1 = n1;
|
||||
|
||||
Value *const V2 = C;
|
||||
MDNode *n2 = getGlobalContext().getMDNode(&V2, 1);
|
||||
WeakVH wn2 = n2;
|
||||
|
||||
EXPECT_NE(wn1, wn2);
|
||||
|
||||
I->replaceAllUsesWith(C);
|
||||
|
||||
EXPECT_EQ(wn1, wn2);
|
||||
}
|
||||
|
||||
TEST(MDNodeTest, Delete) {
|
||||
Constant *C = getGlobalContext().getConstantInt(Type::Int32Ty, 1);
|
||||
Instruction *I = new BitCastInst(C, Type::Int32Ty);
|
||||
|
Reference in New Issue
Block a user