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.
|
/// forwarded on to IRGen.
|
||||||
ASTStage_t ASTStage = Unprocessed;
|
ASTStage_t ASTStage = Unprocessed;
|
||||||
|
|
||||||
/// Virtual filenames declared by #sourceLocation(file:) directives in this
|
/// Virtual file paths declared by \c #sourceLocation(file:) declarations in
|
||||||
/// file.
|
/// this source file.
|
||||||
llvm::SmallVector<Located<StringRef>, 0> VirtualFilenames;
|
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;
|
llvm::StringMap<SourceFilePathInfo> getInfoForUsedFilePaths() const;
|
||||||
|
|
||||||
SourceFile(ModuleDecl &M, SourceFileKind K, Optional<unsigned> bufferID,
|
SourceFile(ModuleDecl &M, SourceFileKind K, Optional<unsigned> bufferID,
|
||||||
|
|||||||
@@ -1968,7 +1968,7 @@ SourceFile::getInfoForUsedFilePaths() const {
|
|||||||
getASTContext().SourceMgr.getLocForBufferStart(BufferID);
|
getASTContext().SourceMgr.getLocForBufferStart(BufferID);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto &vpath : VirtualFilenames) {
|
for (auto &vpath : VirtualFilePaths) {
|
||||||
result[vpath.Item].virtualFileLocs.insert(vpath.Loc);
|
result[vpath.Item].virtualFileLocs.insert(vpath.Loc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4833,7 +4833,7 @@ ParserStatus Parser::parseLineDirective(bool isLine) {
|
|||||||
if (!Filename.hasValue())
|
if (!Filename.hasValue())
|
||||||
return makeParserError();
|
return makeParserError();
|
||||||
SourceLoc filenameLoc = consumeToken(tok::string_literal);
|
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, ",") ||
|
if (parseToken(tok::comma, diag::sourceLocation_expected, ",") ||
|
||||||
parseSpecificIdentifier("line", diag::sourceLocation_expected,
|
parseSpecificIdentifier("line", diag::sourceLocation_expected,
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ public:
|
|||||||
ASTContext &getASTContext() { return M.getASTContext(); }
|
ASTContext &getASTContext() { return M.getASTContext(); }
|
||||||
|
|
||||||
llvm::StringMap<std::pair<std::string, /*isWinner=*/bool>>
|
llvm::StringMap<std::pair<std::string, /*isWinner=*/bool>>
|
||||||
MagicFileStringsByFilePath;
|
MagicFileStringsByFilePath;
|
||||||
|
|
||||||
static DeclName getMagicFunctionName(SILDeclRef ref);
|
static DeclName getMagicFunctionName(SILDeclRef ref);
|
||||||
static DeclName getMagicFunctionName(DeclContext *dc);
|
static DeclName getMagicFunctionName(DeclContext *dc);
|
||||||
|
|||||||
Reference in New Issue
Block a user