Skip to content

Commit fd38a95

Browse files
committed
[TargetParser] Use StringRef::split that takes a char separator instead of StringRef separator. NFC
1 parent afef716 commit fd38a95

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

llvm/lib/TargetParser/Host.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ StringRef sys::detail::getHostCPUNameForARM(StringRef ProcCpuinfoContent) {
173173
// Read 32 lines from /proc/cpuinfo, which should contain the CPU part line
174174
// in all cases.
175175
SmallVector<StringRef, 32> Lines;
176-
ProcCpuinfoContent.split(Lines, "\n");
176+
ProcCpuinfoContent.split(Lines, '\n');
177177

178178
// Look for the CPU implementer line.
179179
StringRef Implementer;
@@ -436,7 +436,7 @@ StringRef sys::detail::getHostCPUNameForS390x(StringRef ProcCpuinfoContent) {
436436
// The "processor 0:" line comes after a fair amount of other information,
437437
// including a cache breakdown, but this should be plenty.
438438
SmallVector<StringRef, 32> Lines;
439-
ProcCpuinfoContent.split(Lines, "\n");
439+
ProcCpuinfoContent.split(Lines, '\n');
440440

441441
// Look for the CPU features.
442442
SmallVector<StringRef, 32> CPUFeatures;
@@ -478,7 +478,7 @@ StringRef sys::detail::getHostCPUNameForS390x(StringRef ProcCpuinfoContent) {
478478
StringRef sys::detail::getHostCPUNameForRISCV(StringRef ProcCpuinfoContent) {
479479
// There are 24 lines in /proc/cpuinfo
480480
SmallVector<StringRef> Lines;
481-
ProcCpuinfoContent.split(Lines, "\n");
481+
ProcCpuinfoContent.split(Lines, '\n');
482482

483483
// Look for uarch line to determine cpu name
484484
StringRef UArch;
@@ -1630,7 +1630,7 @@ StringRef sys::getHostCPUName() {
16301630
#if defined(__linux__)
16311631
StringRef sys::detail::getHostCPUNameForSPARC(StringRef ProcCpuinfoContent) {
16321632
SmallVector<StringRef> Lines;
1633-
ProcCpuinfoContent.split(Lines, "\n");
1633+
ProcCpuinfoContent.split(Lines, '\n');
16341634

16351635
// Look for cpu line to determine cpu name
16361636
StringRef Cpu;
@@ -1970,7 +1970,7 @@ const StringMap<bool> sys::getHostCPUFeatures() {
19701970
return Features;
19711971

19721972
SmallVector<StringRef, 32> Lines;
1973-
P->getBuffer().split(Lines, "\n");
1973+
P->getBuffer().split(Lines, '\n');
19741974

19751975
SmallVector<StringRef, 32> CPUFeatures;
19761976

0 commit comments

Comments
 (0)