Wrap a few functions from LLVM SourceMgr in preparation of making

SourceLoc::Value private


Swift SVN r7114
This commit is contained in:
Dmitri Hrybenko
2013-08-09 23:15:59 +00:00
parent aa11e4be55
commit 8f7a437d44
8 changed files with 38 additions and 27 deletions

View File

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