Skip to content
Merged
Changes from 1 commit
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
8 changes: 4 additions & 4 deletions llvm/lib/TableGen/Record.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1796,11 +1796,11 @@ const Init *TernOpInit::Fold(const Record *CurRec) const {
if (LHSs && MHSs && RHSs) {
std::string Val = RHSs->getValue().str();

StringRef::size_type found;
StringRef::size_type idx = 0;
std::string::size_type found;
std::string::size_type idx = 0;
while (true) {
found = StringRef(Val).find(LHSs->getValue(), idx);
if (found == StringRef::npos)
found = Val.find(LHSs->getValue(), idx);
if (found == std::string::npos)
break;
Val.replace(found, LHSs->getValue().size(), MHSs->getValue().str());
idx = found + MHSs->getValue().size();
Expand Down