mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Adapt to llvm.org StringRef API change
This commit is contained in:
committed by
Michael Forster
parent
710799dd09
commit
259d78a350
@@ -274,7 +274,7 @@ static void initDocGenericParams(const Decl *D, DocEntityInfo &Info) {
|
||||
if (GP->getDecl()->isImplicit())
|
||||
continue;
|
||||
DocGenericParam Param;
|
||||
Param.Name = GP->getName().str();
|
||||
Param.Name = std::string(GP->getName());
|
||||
Info.GenericParams.push_back(Param);
|
||||
}
|
||||
|
||||
@@ -959,7 +959,7 @@ static bool getModuleInterfaceInfo(ASTContext &Ctx, StringRef ModuleName,
|
||||
AnnotatingPrinter Printer(OS);
|
||||
printModuleInterface(M, None, TraversalOptions, Printer, Options,
|
||||
true);
|
||||
Info.Text = OS.str();
|
||||
Info.Text = std::string(OS.str());
|
||||
Info.TopEntities = std::move(Printer.TopEntities);
|
||||
Info.References = std::move(Printer.References);
|
||||
return false;
|
||||
@@ -1080,7 +1080,7 @@ static bool getSourceTextInfo(CompilerInstance &CI,
|
||||
Walker.walk(*CI.getMainModule());
|
||||
|
||||
CharSourceRange FullRange = SM.getRangeForBuffer(BufID);
|
||||
Info.Text = SM.extractText(FullRange);
|
||||
Info.Text = SM.extractText(FullRange).str();
|
||||
Info.TopEntities = std::move(Walker.TopEntities);
|
||||
Info.References = std::move(Walker.References);
|
||||
return false;
|
||||
@@ -1168,8 +1168,8 @@ public:
|
||||
R.StartLine, R.StartColumn, R.EndLine, R.EndColumn,
|
||||
R.ArgIndex
|
||||
}; });
|
||||
return {Start.first, Start.second, End.first, End.second, R.Text,
|
||||
std::move(SubRanges)};
|
||||
return {Start.first, Start.second, End.first,
|
||||
End.second, R.Text.str(), std::move(SubRanges)};
|
||||
});
|
||||
unsigned End = AllEdits.size();
|
||||
StartEnds.emplace_back(Start, End);
|
||||
|
||||
Reference in New Issue
Block a user