From 6aaf0a68acfa16b2af1693b7cfcf41f77a4e2244 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Thu, 10 Sep 2015 06:12:31 +0000 Subject: [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247245 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/MC/MCSectionMachO.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/MC/MCSectionMachO.cpp') diff --git a/lib/MC/MCSectionMachO.cpp b/lib/MC/MCSectionMachO.cpp index c9f15914e4b..879c6e5ff93 100644 --- a/lib/MC/MCSectionMachO.cpp +++ b/lib/MC/MCSectionMachO.cpp @@ -177,7 +177,7 @@ std::string MCSectionMachO::ParseSectionSpecifier(StringRef Spec, // In. TAAParsed = false; SmallVector SplitSpec; - Spec.split(SplitSpec, ","); + Spec.split(SplitSpec, ','); // Remove leading and trailing whitespace. auto GetEmptyOrTrim = [&SplitSpec](size_t Idx) -> StringRef { return SplitSpec.size() > Idx ? SplitSpec[Idx].trim() : StringRef(); @@ -235,7 +235,7 @@ std::string MCSectionMachO::ParseSectionSpecifier(StringRef Spec, // In. // The attribute list is a '+' separated list of attributes. SmallVector SectionAttrs; - Attrs.split(SectionAttrs, "+", /*MaxSplit=*/-1, /*KeepEmpty=*/false); + Attrs.split(SectionAttrs, '+', /*MaxSplit=*/-1, /*KeepEmpty=*/false); for (StringRef &SectionAttr : SectionAttrs) { auto AttrDescriptorI = std::find_if( -- cgit v1.2.3