Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion llvm/include/llvm/Support/SpecialCaseList.h
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ class SpecialCaseList {
findMatcher(StringRef Prefix, StringRef Category) const;

Matcher SectionMatcher;
std::string SectionStr;
StringRef SectionStr;
SectionEntries Entries;
unsigned FileIdx;
};
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Support/SpecialCaseList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,10 @@ bool SpecialCaseList::createInternal(const MemoryBuffer *MB, std::string &Error,
Expected<SpecialCaseList::Section *>
SpecialCaseList::addSection(StringRef SectionStr, unsigned FileNo,
unsigned LineNo, bool UseGlobs) {
SectionStr = SectionStr.copy(StrAlloc);
Sections.emplace_back(SectionStr, FileNo, UseGlobs);
auto &Section = Sections.back();

SectionStr = SectionStr.copy(StrAlloc);
if (auto Err = Section.SectionMatcher.insert(SectionStr, LineNo)) {
return createStringError(errc::invalid_argument,
"malformed section at line " + Twine(LineNo) +
Expand Down
Loading