Adapt to llvm.org StringRef API change

This commit is contained in:
Fred Riss
2020-01-31 15:31:50 -08:00
committed by Michael Forster
parent 710799dd09
commit 259d78a350
99 changed files with 346 additions and 327 deletions

View File

@@ -3252,8 +3252,11 @@ static std::string insertUnderscore(StringRef Text) {
static void insertUnderscoreInDigits(StringRef Digits,
llvm::raw_ostream &OS) {
std::string BeforePoint, AfterPoint;
std::tie(BeforePoint, AfterPoint) = Digits.split('.');
StringRef BeforePointRef, AfterPointRef;
std::tie(BeforePointRef, AfterPointRef) = Digits.split('.');
std::string BeforePoint(BeforePointRef);
std::string AfterPoint(AfterPointRef);
// Insert '_' for the part before the decimal point.
std::reverse(BeforePoint.begin(), BeforePoint.end());
@@ -3752,7 +3755,7 @@ refactorSwiftModule(ModuleDecl *M, RefactoringOptions Opts,
// Use the default name if not specified.
if (Opts.PreferredName.empty()) {
Opts.PreferredName = getDefaultPreferredName(Opts.Kind);
Opts.PreferredName = getDefaultPreferredName(Opts.Kind).str();
}
switch (Opts.Kind) {