diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-11-19 05:49:42 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-11-19 05:49:42 +0000 |
commit | 5106ce789771fafb4e3ea7faa2262fbf276753cd (patch) | |
tree | e2fbf0655ed702ef925b52fc3f65cefdf9ec83a2 /llvm/lib/Support/Host.cpp | |
parent | 1eb8220aff18a095c180efb0f44e452eeca5f643 (diff) | |
download | llvm-5106ce789771fafb4e3ea7faa2262fbf276753cd.zip llvm-5106ce789771fafb4e3ea7faa2262fbf276753cd.tar.gz llvm-5106ce789771fafb4e3ea7faa2262fbf276753cd.tar.bz2 |
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
Diffstat (limited to 'llvm/lib/Support/Host.cpp')
-rw-r--r-- | llvm/lib/Support/Host.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/Host.cpp b/llvm/lib/Support/Host.cpp index e2dd6d5..8782e2e 100644 --- a/llvm/lib/Support/Host.cpp +++ b/llvm/lib/Support/Host.cpp @@ -759,13 +759,13 @@ bool sys::getHostCPUFeatures(StringMap<bool> &Features) { #endif if (LLVMFeatureStr != "") - Features.GetOrCreateValue(LLVMFeatureStr).setValue(true); + Features[LLVMFeatureStr] = true; } #if defined(__aarch64__) // If we have all crypto bits we can add the feature if (crypto == (CAP_AES | CAP_PMULL | CAP_SHA1 | CAP_SHA2)) - Features.GetOrCreateValue("crypto").setValue(true); + Features["crypto"] = true; #endif return true; |