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/MC/MCSectionMachO.cpp | |
parent | 477121721bd8b103d2785f5fdf3f110e54dc0e54 (diff) | |
download | bcm5719-llvm-e4405e949f7cdd701beb8a42a960f554276657b5.tar.gz bcm5719-llvm-e4405e949f7cdd701beb8a42a960f554276657b5.zip |
[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/MC/MCSectionMachO.cpp')
-rw-r--r-- | llvm/lib/MC/MCSectionMachO.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCSectionMachO.cpp b/llvm/lib/MC/MCSectionMachO.cpp index c9f15914e4b..879c6e5ff93 100644 --- a/llvm/lib/MC/MCSectionMachO.cpp +++ b/llvm/lib/MC/MCSectionMachO.cpp @@ -177,7 +177,7 @@ std::string MCSectionMachO::ParseSectionSpecifier(StringRef Spec, // In. TAAParsed = false; SmallVector<StringRef, 5> 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<StringRef, 1> SectionAttrs; - Attrs.split(SectionAttrs, "+", /*MaxSplit=*/-1, /*KeepEmpty=*/false); + Attrs.split(SectionAttrs, '+', /*MaxSplit=*/-1, /*KeepEmpty=*/false); for (StringRef &SectionAttr : SectionAttrs) { auto AttrDescriptorI = std::find_if( |