Remove StringMap::GetOrCreateValue in favor of StringMap::insert
authorDavid Blaikie <dblaikie@gmail.com>
Wed, 19 Nov 2014 05:49:42 +0000 (05:49 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Wed, 19 Nov 2014 05:49:42 +0000 (05:49 +0000)
commit1d4f28c6bc55701d0f4d476cd81c1bd959f22745
tree9c0149498a0be22bd4955af41e3a715fa2bc60a3
parentfb44491356e111c35200f33ab5420dd47b2cfbff
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222319 91177308-0d34-0410-b5e6-96231b3b80d8
22 files changed:
include/llvm/ADT/StringMap.h
include/llvm/LTO/LTOModule.h
include/llvm/MC/StringTableBuilder.h
include/llvm/TableGen/StringToOffsetTable.h
lib/CodeGen/AsmPrinter/DwarfStringPool.cpp
lib/CodeGen/GCMetadata.cpp
lib/IR/Constants.cpp
lib/IR/LLVMContext.cpp
lib/IR/Module.cpp
lib/IR/Type.cpp
lib/IR/ValueSymbolTable.cpp
lib/LTO/LTOModule.cpp
lib/Linker/LinkModules.cpp
lib/MC/MCContext.cpp
lib/MC/MCDwarf.cpp
lib/Support/CommandLine.cpp
lib/Support/Host.cpp
lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
lib/Target/ARM/AsmParser/ARMAsmParser.cpp
tools/yaml2obj/yaml2elf.cpp
unittests/ADT/StringMapTest.cpp
utils/TableGen/CodeGenRegisters.cpp