diff --git a/llvm/unittests/ProfileData/SampleProfTest.cpp b/llvm/unittests/ProfileData/SampleProfTest.cpp index 5421882e811e..62273740c91a 100644 --- a/llvm/unittests/ProfileData/SampleProfTest.cpp +++ b/llvm/unittests/ProfileData/SampleProfTest.cpp @@ -121,8 +121,6 @@ struct SampleProfTest : ::testing::Test { delete PS; // Test that summary can be attached to and read back from module. - PS = ProfileSummary::getFromMD(MD); - M.eraseNamedMetadata(M.getOrInsertModuleFlagsMetadata()); M.setProfileSummary(MD, ProfileSummary::PSK_Sample); MD = M.getProfileSummary(/* IsCS */ false);