mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Wrap a few functions from LLVM SourceMgr in preparation of making
SourceLoc::Value private Swift SVN r7114
This commit is contained in:
@@ -78,7 +78,7 @@ private:
|
||||
assert(FE);
|
||||
assert(FE->getBodyKind() == FuncExpr::BodyKind::Unparsed);
|
||||
|
||||
int BufferID = TU->Ctx.SourceMgr->FindBufferContainingLoc(FD->getLoc().Value);
|
||||
int BufferID = TU->Ctx.SourceMgr.findBufferContainingLoc(FD->getLoc());
|
||||
Parser TheParser(BufferID, TU, nullptr, &ParserState);
|
||||
|
||||
std::unique_ptr<CodeCompletionCallbacks> CodeCompletion;
|
||||
@@ -103,7 +103,7 @@ void parseDelayedTopLevelDecl(
|
||||
return;
|
||||
|
||||
int BufferID = TU->Ctx.SourceMgr
|
||||
->FindBufferContainingLoc(ParserState.getDelayedDeclLoc().Value);
|
||||
.findBufferContainingLoc(ParserState.getDelayedDeclLoc());
|
||||
Parser TheParser(BufferID, TU, nullptr, &ParserState);
|
||||
|
||||
std::unique_ptr<CodeCompletionCallbacks> CodeCompletion(
|
||||
@@ -240,7 +240,7 @@ Parser::Parser(unsigned BufferID, TranslationUnit *TU, SILParserState *SIL,
|
||||
|
||||
auto ParserPos = State->takeParserPosition();
|
||||
if (ParserPos.isValid() &&
|
||||
SourceMgr->FindBufferContainingLoc(ParserPos.Loc.Value) == int(BufferID)) {
|
||||
SourceMgr.findBufferContainingLoc(ParserPos.Loc) == int(BufferID)) {
|
||||
auto BeginParserPosition = getParserPosition(ParserPos);
|
||||
restoreParserPosition(BeginParserPosition);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user