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

@@ -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);