summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
Diffstat (limited to 'unittests')
-rw-r--r--unittests/IR/MetadataTest.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/unittests/IR/MetadataTest.cpp b/unittests/IR/MetadataTest.cpp
index d14743dad70..a36e131b4bc 100644
--- a/unittests/IR/MetadataTest.cpp
+++ b/unittests/IR/MetadataTest.cpp
@@ -2242,32 +2242,6 @@ TEST_F(FunctionAttachmentTest, getAll) {
EXPECT_EQ(T2, MDs[3].second);
}
-TEST_F(FunctionAttachmentTest, dropUnknownMetadata) {
- Function *F = getFunction("foo");
-
- MDTuple *T1 = getTuple();
- MDTuple *T2 = getTuple();
- MDTuple *P = getTuple();
- DISubprogram *SP = getSubprogram();
-
- F->setMetadata("other1", T1);
- F->setMetadata(LLVMContext::MD_dbg, SP);
- F->setMetadata("other2", T2);
- F->setMetadata(LLVMContext::MD_prof, P);
-
- unsigned Known[] = {Context.getMDKindID("other2"), LLVMContext::MD_prof};
- F->dropUnknownMetadata(Known);
-
- EXPECT_EQ(T2, F->getMetadata("other2"));
- EXPECT_EQ(P, F->getMetadata(LLVMContext::MD_prof));
- EXPECT_EQ(nullptr, F->getMetadata("other1"));
- EXPECT_EQ(nullptr, F->getMetadata(LLVMContext::MD_dbg));
-
- F->setMetadata("other2", nullptr);
- F->setMetadata(LLVMContext::MD_prof, nullptr);
- EXPECT_FALSE(F->hasMetadata());
-}
-
TEST_F(FunctionAttachmentTest, Verifier) {
Function *F = getFunction("foo");
F->setMetadata("attach", getTuple());