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)
commit5106ce789771fafb4e3ea7faa2262fbf276753cd
treee2fbf0655ed702ef925b52fc3f65cefdf9ec83a2
parent1eb8220aff18a095c180efb0f44e452eeca5f643
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
22 files changed:
llvm/include/llvm/ADT/StringMap.h
llvm/include/llvm/LTO/LTOModule.h
llvm/include/llvm/MC/StringTableBuilder.h
llvm/include/llvm/TableGen/StringToOffsetTable.h
llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.cpp
llvm/lib/CodeGen/GCMetadata.cpp
llvm/lib/IR/Constants.cpp
llvm/lib/IR/LLVMContext.cpp
llvm/lib/IR/Module.cpp
llvm/lib/IR/Type.cpp
llvm/lib/IR/ValueSymbolTable.cpp
llvm/lib/LTO/LTOModule.cpp
llvm/lib/Linker/LinkModules.cpp
llvm/lib/MC/MCContext.cpp
llvm/lib/MC/MCDwarf.cpp
llvm/lib/Support/CommandLine.cpp
llvm/lib/Support/Host.cpp
llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
llvm/tools/yaml2obj/yaml2elf.cpp
llvm/unittests/ADT/StringMapTest.cpp
llvm/utils/TableGen/CodeGenRegisters.cpp