mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #30395 from brentdax/two-revisions-for-two-revisions-for-slashing
This commit is contained in:
@@ -329,10 +329,13 @@ public:
|
||||
/// forwarded on to IRGen.
|
||||
ASTStage_t ASTStage = Unprocessed;
|
||||
|
||||
/// Virtual filenames declared by #sourceLocation(file:) directives in this
|
||||
/// file.
|
||||
llvm::SmallVector<Located<StringRef>, 0> VirtualFilenames;
|
||||
/// Virtual file paths declared by \c #sourceLocation(file:) declarations in
|
||||
/// this source file.
|
||||
llvm::SmallVector<Located<StringRef>, 0> VirtualFilePaths;
|
||||
|
||||
/// Returns information about the file paths used for diagnostics and magic
|
||||
/// identifiers in this source file, including virtual filenames introduced by
|
||||
/// \c #sourceLocation(file:) declarations.
|
||||
llvm::StringMap<SourceFilePathInfo> getInfoForUsedFilePaths() const;
|
||||
|
||||
SourceFile(ModuleDecl &M, SourceFileKind K, Optional<unsigned> bufferID,
|
||||
|
||||
@@ -1968,7 +1968,7 @@ SourceFile::getInfoForUsedFilePaths() const {
|
||||
getASTContext().SourceMgr.getLocForBufferStart(BufferID);
|
||||
}
|
||||
|
||||
for (auto &vpath : VirtualFilenames) {
|
||||
for (auto &vpath : VirtualFilePaths) {
|
||||
result[vpath.Item].virtualFileLocs.insert(vpath.Loc);
|
||||
}
|
||||
|
||||
|
||||
@@ -4833,7 +4833,7 @@ ParserStatus Parser::parseLineDirective(bool isLine) {
|
||||
if (!Filename.hasValue())
|
||||
return makeParserError();
|
||||
SourceLoc filenameLoc = consumeToken(tok::string_literal);
|
||||
SF.VirtualFilenames.emplace_back(*Filename, filenameLoc);
|
||||
SF.VirtualFilePaths.emplace_back(*Filename, filenameLoc);
|
||||
|
||||
if (parseToken(tok::comma, diag::sourceLocation_expected, ",") ||
|
||||
parseSpecificIdentifier("line", diag::sourceLocation_expected,
|
||||
|
||||
Reference in New Issue
Block a user