1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 10:32:48 +02:00

PR51018: A few more explicit conversions from SmallString to StringRef

Follow-up to 1def2579e10dd84405465f403e8c31acebff0c97 with a few more
obscure cases.
This commit is contained in:
David Blaikie 2021-07-09 13:52:39 -07:00
parent bacbf6d868
commit 6212b5a386
3 changed files with 3 additions and 3 deletions

View File

@ -553,7 +553,7 @@ public:
return Ranges;
}
StringRef getFixedSizePortion() const { return FixedSizePortion; }
StringRef getFixedSizePortion() const { return FixedSizePortion.str(); }
static bool classof(const MCFragment *F) {
return F->getKind() == MCFragment::FT_CVDefRange;

View File

@ -194,7 +194,7 @@ static std::error_code WildcardExpand(StringRef Arg,
// Append FileName to Dir, and remove it afterwards.
llvm::sys::path::append(Dir, FileName);
Args.push_back(Saver.save(StringRef(Dir)).data());
Args.push_back(Saver.save(Dir.str()).data());
Dir.resize(DirSize);
} while (FindNextFileW(FindHandle, &FileData));

View File

@ -251,7 +251,7 @@ void EmitOptParser(RecordKeeper &Records, raw_ostream &OS) {
// Prefix values.
OS << ", {";
for (StringRef PrefixKey : Prefix.first)
for (const auto &PrefixKey : Prefix.first)
OS << "\"" << PrefixKey << "\" COMMA ";
OS << "nullptr})\n";
}