diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2015-09-10 06:12:31 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2015-09-10 06:12:31 +0000 |
commit | e4405e949f7cdd701beb8a42a960f554276657b5 (patch) | |
tree | 17a7c18bb346aef237fc4dfc04bc03995c119b35 /llvm/lib/Support/Host.cpp | |
parent | 477121721bd8b103d2785f5fdf3f110e54dc0e54 (diff) | |
download | llvm-e4405e949f7cdd701beb8a42a960f554276657b5.zip llvm-e4405e949f7cdd701beb8a42a960f554276657b5.tar.gz llvm-e4405e949f7cdd701beb8a42a960f554276657b5.tar.bz2 |
[ADT] Switch a bunch of places in LLVM that were doing single-character
splits to actually use the single character split routine which does
less work, and in a debug build is *substantially* faster.
llvm-svn: 247245
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 09f6631..cb1c82b 100644 --- a/llvm/lib/Support/Host.cpp +++ b/llvm/lib/Support/Host.cpp @@ -697,7 +697,7 @@ StringRef sys::getHostCPUName() { if (Lines[I].startswith("features")) { size_t Pos = Lines[I].find(":"); if (Pos != StringRef::npos) { - Lines[I].drop_front(Pos + 1).split(CPUFeatures, " "); + Lines[I].drop_front(Pos + 1).split(CPUFeatures, ' '); break; } } @@ -840,7 +840,7 @@ bool sys::getHostCPUFeatures(StringMap<bool> &Features) { // Look for the CPU features. for (unsigned I = 0, E = Lines.size(); I != E; ++I) if (Lines[I].startswith("Features")) { - Lines[I].split(CPUFeatures, " "); + Lines[I].split(CPUFeatures, ' '); break; } |