aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Frontend/VerifyDiagnosticConsumer.cpp')
-rw-r--r--clang/lib/Frontend/VerifyDiagnosticConsumer.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp b/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp
index 56e05242f7c9..0503ae46a15f 100644
--- a/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp
+++ b/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp
@@ -554,15 +554,15 @@ static bool ParseDirective(StringRef S, ExpectedData *ED, SourceManager &SM,
continue;
}
- const FileEntry *FE = &File->getFileEntry();
- if (SM.translateFile(FE).isInvalid())
- SM.createFileID(FE, Pos, SrcMgr::C_User);
+ FileID FID = SM.translateFile(*File);
+ if (FID.isInvalid())
+ FID = SM.createFileID(*File, Pos, SrcMgr::C_User);
if (PH.Next(Line) && Line > 0)
- ExpectedLoc = SM.translateFileLineCol(FE, Line, 1);
+ ExpectedLoc = SM.translateLineCol(FID, Line, 1);
else if (PH.Next("*")) {
MatchAnyLine = true;
- ExpectedLoc = SM.translateFileLineCol(FE, 1, 1);
+ ExpectedLoc = SM.translateLineCol(FID, 1, 1);
}
}
} else if (PH.Next("*")) {
@@ -827,7 +827,7 @@ static bool findDirectives(SourceManager &SM, FileID FID,
return false;
// Create a lexer to lex all the tokens of the main file in raw mode.
- const llvm::MemoryBuffer *FromFile = SM.getBuffer(FID);
+ llvm::MemoryBufferRef FromFile = SM.getBufferOrFake(FID);
Lexer RawLex(FID, FromFile, SM, LangOpts);
// Return comments as tokens, this is how we find expected diagnostics.