Remove StringMap::GetOrCreateValue in favor of StringMap::insert
[oota-llvm.git] / lib / IR / LLVMContext.cpp
index a1a4f63da325461138e47fb8e0942688cbb3df82..c62bc0936c49d4e6908eb9795b13e8cfb4880f5d 100644 (file)
@@ -253,9 +253,10 @@ unsigned LLVMContext::getMDKindID(StringRef Name) const {
   assert(isValidName(Name) && "Invalid MDNode name");
 
   // If this is new, assign it its ID.
-  return
-    pImpl->CustomMDKindNames.GetOrCreateValue(
-      Name, pImpl->CustomMDKindNames.size()).second;
+  return pImpl->CustomMDKindNames.insert(std::make_pair(
+                                             Name,
+                                             pImpl->CustomMDKindNames.size()))
+      .first->second;
 }
 
 /// getHandlerNames - Populate client supplied smallvector using custome