From 5106ce789771fafb4e3ea7faa2262fbf276753cd Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Wed, 19 Nov 2014 05:49:42 +0000 Subject: Remove StringMap::GetOrCreateValue in favor of StringMap::insert Having two ways to do this doesn't seem terribly helpful and consistently using the insert version (which we already has) seems like it'll make the code easier to understand to anyone working with standard data structures. (I also updated many references to the Entry's key and value to use first() and second instead of getKey{Data,Length,} and get/setValue - for similar consistency) Also removes the GetOrCreateValue functions so there's less surface area to StringMap to fix/improve/change/accommodate move semantics, etc. llvm-svn: 222319 --- llvm/lib/CodeGen/GCMetadata.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/GCMetadata.cpp') diff --git a/llvm/lib/CodeGen/GCMetadata.cpp b/llvm/lib/CodeGen/GCMetadata.cpp index c3e4f3ee2fb..ed40982d451 100644 --- a/llvm/lib/CodeGen/GCMetadata.cpp +++ b/llvm/lib/CodeGen/GCMetadata.cpp @@ -73,7 +73,7 @@ GCStrategy *GCModuleInfo::getOrCreateStrategy(const Module *M, std::unique_ptr S = I->instantiate(); S->M = M; S->Name = Name; - StrategyMap.GetOrCreateValue(Name).setValue(S.get()); + StrategyMap[Name] = S.get(); StrategyList.push_back(std::move(S)); return StrategyList.back().get(); } -- cgit v1.2.3