diff --git a/llvm/unittests/ADT/StringSetTest.cpp b/llvm/unittests/ADT/StringSetTest.cpp --- a/llvm/unittests/ADT/StringSetTest.cpp +++ b/llvm/unittests/ADT/StringSetTest.cpp @@ -33,11 +33,12 @@ // Test insert(StringMapEntry) and count(StringMapEntry) // which are required for set_difference(StringSet, StringSet). StringSet<> Set; - StringMapEntry Element(1, "A"); - Set.insert(Element); - size_t Count = Set.count(Element); + StringMapEntry *Element = StringMapEntry::Create("A"); + Set.insert(*Element); + size_t Count = Set.count(*Element); size_t Expected = 1; EXPECT_EQ(Expected, Count); + Element->Destroy(); } } // end anonymous namespace