mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Adapt to llvm.org StringRef API change
This commit is contained in:
committed by
Michael Forster
parent
710799dd09
commit
259d78a350
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user