diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
commit | cfca06d7963fa0909f90483b42a6d7d194d01e08 (patch) | |
tree | 209fb2a2d68f8f277793fc8df46c753d31bc853b /llvm/lib/Support/SpecialCaseList.cpp | |
parent | 706b4fc47bbc608932d3b491ae19a3b9cde9497b (diff) |
Notes
Diffstat (limited to 'llvm/lib/Support/SpecialCaseList.cpp')
-rw-r--r-- | llvm/lib/Support/SpecialCaseList.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Support/SpecialCaseList.cpp b/llvm/lib/Support/SpecialCaseList.cpp index d1ff44cefb08..73f852624a69 100644 --- a/llvm/lib/Support/SpecialCaseList.cpp +++ b/llvm/lib/Support/SpecialCaseList.cpp @@ -126,7 +126,7 @@ bool SpecialCaseList::createInternal(const MemoryBuffer *MB, bool SpecialCaseList::parse(const MemoryBuffer *MB, StringMap<size_t> &SectionsMap, std::string &Error) { - // Iterate through each line in the blacklist file. + // Iterate through each line in the exclusion list file. SmallVector<StringRef, 16> Lines; MB->getBuffer().split(Lines, '\n'); @@ -172,14 +172,14 @@ bool SpecialCaseList::parse(const MemoryBuffer *MB, } std::pair<StringRef, StringRef> SplitRegexp = SplitLine.second.split("="); - std::string Regexp = SplitRegexp.first; + std::string Regexp = std::string(SplitRegexp.first); StringRef Category = SplitRegexp.second; // Create this section if it has not been seen before. if (SectionsMap.find(Section) == SectionsMap.end()) { std::unique_ptr<Matcher> M = std::make_unique<Matcher>(); std::string REError; - if (!M->insert(Section, LineNo, REError)) { + if (!M->insert(std::string(Section), LineNo, REError)) { Error = (Twine("malformed section ") + Section + ": '" + REError).str(); return false; } |